diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2015-10-01 03:22:29 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2015-10-01 03:23:27 -0500 |
commit | 2028aa37a3aad4a77e8f45e81d3ef5f0d7694b10 (patch) | |
tree | 0df1499c4dcc826f9c2301b5afddbae3d924d1f2 | |
parent | d6572f16d55904290d0d261edf73006e5a54ca30 (diff) | |
download | tdebase-2028aa37a3aad4a77e8f45e81d3ef5f0d7694b10.tar.gz tdebase-2028aa37a3aad4a77e8f45e81d3ef5f0d7694b10.zip |
Fix kdesktop_lock crash on error with certain PAM stack configurations
-rw-r--r-- | tdmlib/kgreet_classic.cpp | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/tdmlib/kgreet_classic.cpp b/tdmlib/kgreet_classic.cpp index f99acfb3c..24fe32ede 100644 --- a/tdmlib/kgreet_classic.cpp +++ b/tdmlib/kgreet_classic.cpp @@ -482,22 +482,32 @@ KClassicGreeter::revive() } } - // assert( !running ); - setActive2( true ); + // assert(!running); + setActive2(true); if (authTok) { - passwd1Edit->erase(); - passwd2Edit->erase(); - passwd1Edit->setFocus(); - } else { + if (passwd1Edit) { + passwd1Edit->erase(); + } + if (passwd2Edit) { + passwd2Edit->erase(); + } + if (passwd1Edit) { + passwd1Edit->setFocus(); + } + } + else { passwdEdit->erase(); - if (loginEdit && loginEdit->isEnabled()) + if (loginEdit && loginEdit->isEnabled()) { passwdEdit->setEnabled( true ); + } else { setActive( true ); - if (loginEdit && loginEdit->text().isEmpty()) + if (loginEdit && loginEdit->text().isEmpty()) { loginEdit->setFocus(); - else + } + else { passwdEdit->setFocus(); + } } } } |