summaryrefslogtreecommitdiffstats
path: root/tdmlib
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2015-10-01 03:22:29 -0500
committerSlávek Banko <slavek.banko@axis.cz>2015-10-03 16:56:14 +0200
commite2625ec0214c719102e3520cb083ba0558ce16ca (patch)
tree9364a4008281b24cd1ebfdb0585dc6eaedb8c0ed /tdmlib
parent969887429084da3b5a5d7d669015ff3489f6521c (diff)
downloadtdebase-e2625ec0214c719102e3520cb083ba0558ce16ca.tar.gz
tdebase-e2625ec0214c719102e3520cb083ba0558ce16ca.zip
Fix kdesktop_lock crash on error with certain PAM stack configurations
(cherry picked from commit 2028aa37a3aad4a77e8f45e81d3ef5f0d7694b10)
Diffstat (limited to 'tdmlib')
-rw-r--r--tdmlib/kgreet_classic.cpp28
1 files changed, 19 insertions, 9 deletions
diff --git a/tdmlib/kgreet_classic.cpp b/tdmlib/kgreet_classic.cpp
index 3d1cedc19..acb953b54 100644
--- a/tdmlib/kgreet_classic.cpp
+++ b/tdmlib/kgreet_classic.cpp
@@ -402,22 +402,32 @@ KClassicGreeter::failed()
void // virtual
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();
+ }
}
}
}