From 93bbac1431bf40a313961444232111be541709e2 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Wed, 24 Apr 2013 13:52:11 -0500 Subject: Fix tdm greeter crash caused by invalid access to sessionTypes member This resolves Bug 1449 --- tdm/kfrontend/kgreeter.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tdm/kfrontend/kgreeter.cpp b/tdm/kfrontend/kgreeter.cpp index 9bcf60eb5..0a71eddad 100644 --- a/tdm/kfrontend/kgreeter.cpp +++ b/tdm/kfrontend/kgreeter.cpp @@ -655,10 +655,12 @@ void // private KGreeter::setPrevWM( int wm ) { if (curPrev != wm) { - if (curPrev != -1) + if (curPrev != -1) { sessMenu->changeItem( curPrev, sessionTypes[curPrev].name ); - if (wm != -1) + } + if (wm != -1) { sessMenu->changeItem( wm, sessionTypes[wm].name + i18n(" (previous)") ); + } curPrev = wm; } } @@ -794,7 +796,6 @@ KGreeter::verifyOk() GSendInt( G_PutDmrc ); GSendStr( "Session" ); GSendStr( "default" ); - curWMSession = sessionTypes[curSel].type.utf8(); } GSendInt( G_Ready ); closingDown = true; @@ -804,8 +805,9 @@ KGreeter::verifyOk() void KGreeter::verifyFailed() { - if (needLoad) + if (needLoad) { slotLoadPrevWM(); + } } void -- cgit v1.2.1