Gnats 4647: Clearing workspace with slot with expression dialog open crashes This crash occurred on Windows, both 5.1 and 5.0.4. Not on Solaris. Fixed 11-17-2008, in both builds and prerel. ------------------------ Q3GUI/RplExprSlotDlg.cpp Q3GUI/RplExprSlotDlg.hpp Q3GUI/Workspace.cpp ------------------------ Three changes: (1) Workspace::closeWorkspaceObjDialogs(), use delete dlg; instead of close(true); On Windows, the effect of deleting Open Object dialogs was being decoupled, which broke our 'clearing' mechanism. (2) Needed QObject 'destroyed()' notification from a RplExprSlotDlg's RplQtFrame to the dialog. The RplDlgMgr was just clearing its RplFrameList without notifications to the owners of a RplFrame (and then it asserts when a client tries to remove its RplFrame!). (3) Safer handling of Slot and SimObj deletion callbacks within RplExprSlotDlg. Change processing in: (a) RplExprSlotDlg::simObjDeletedHandler (SimWorkspace*, SimObj*) (b) RplExprSlotDlg::slotDeletedHandler (SimObj*, Slot*) OLD (first example): if (simObj && (_simObj == simObj)) { deleteCallbacks(); _simObj = NULL; close (true); } NEW (first example): if (simObj && (_simObj == simObj)) { hide(); deleteCallbacks(); if (_rplFrame) { delete _rplFrame; _rplFrame = NULL; } _simObj = NULL; _slot = NULL; close (true); } Also, a few _rplFrame NULL pointer checks before dereferencing. ===