Hello, qt-gui crashes when there is a custom auto away message dialog open while the corresponding user gets deleted in the meantime. on pressing "ok" or "clear" qt-gui crashes due to a nullpointer.
the attached patch should fix this issue. thomas -- Q: How many supply-siders does it take to change a light bulb? A: None. The darkness will cause the light bulb to change by itself.
Index: plugins/qt-gui/src/awaymsgdlg.cpp
===================================================================
RCS file: /cvsroot/licq/qt-gui/src/awaymsgdlg.cpp,v
retrieving revision 1.50
diff -u -3 -p -r1.50 awaymsgdlg.cpp
--- plugins/qt-gui/src/awaymsgdlg.cpp 15 Dec 2002 15:20:15 -0000 1.50
+++ plugins/qt-gui/src/awaymsgdlg.cpp 18 Jan 2003 18:14:28 -0000
@@ -292,10 +292,13 @@ void CustomAwayMsgDlg::slot_ok()
s.truncate(s.length()-1);
ICQUser *u = gUserManager.FetchUser(m_nUin, LOCK_W);
- u->SetCustomAutoResponse(s.local8Bit());
- gUserManager.DropUser(u);
- CICQSignal sig(SIGNAL_UPDATExUSER, USER_BASIC, m_nUin);
- gMainWindow->slot_updatedUser(&sig);
+ if (u != NULL)
+ {
+ u->SetCustomAutoResponse(s.local8Bit());
+ gUserManager.DropUser(u);
+ CICQSignal sig(SIGNAL_UPDATExUSER, USER_BASIC, m_nUin);
+ gMainWindow->slot_updatedUser(&sig);
+ }
close();
}
@@ -303,10 +306,13 @@ void CustomAwayMsgDlg::slot_ok()
void CustomAwayMsgDlg::slot_clear()
{
ICQUser *u = gUserManager.FetchUser(m_nUin, LOCK_W);
- u->ClearCustomAutoResponse();
- gUserManager.DropUser(u);
- CICQSignal sig(SIGNAL_UPDATExUSER, USER_BASIC, m_nUin);
- gMainWindow->slot_updatedUser(&sig);
+ if (u != NULL)
+ {
+ u->ClearCustomAutoResponse();
+ gUserManager.DropUser(u);
+ CICQSignal sig(SIGNAL_UPDATExUSER, USER_BASIC, m_nUin);
+ gMainWindow->slot_updatedUser(&sig);
+ }
close();
}
msg01897/pgp00000.pgp
Description: signature
