[haiku-commits] r42066 - haiku/trunk/src/apps/debugger/user_interface/gui

  • From: anevilyak@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 9 Jun 2011 03:59:22 +0200 (CEST)

Author: anevilyak
Date: 2011-06-09 03:59:21 +0200 (Thu, 09 Jun 2011)
New Revision: 42066
Changeset: https://dev.haiku-os.org/changeset/42066

Modified:
   haiku/trunk/src/apps/debugger/user_interface/gui/GraphicalUserInterface.cpp
Log:
Resolve TODO.



Modified: 
haiku/trunk/src/apps/debugger/user_interface/gui/GraphicalUserInterface.cpp
===================================================================
--- haiku/trunk/src/apps/debugger/user_interface/gui/GraphicalUserInterface.cpp 
2011-06-09 00:27:32 UTC (rev 42065)
+++ haiku/trunk/src/apps/debugger/user_interface/gui/GraphicalUserInterface.cpp 
2011-06-09 01:59:21 UTC (rev 42066)
@@ -51,9 +51,8 @@
 {
        // quit window
        if (fTeamWindow != NULL) {
-               // TODO: This is not clean. If the window has been deleted we 
shouldn't
-               // try to access it!
-               if (fTeamWindow->Lock())
+               BMessenger messenger(fTeamWindow);
+               if (messenger.IsValid() && messenger.LockTarget())
                        fTeamWindow->Quit();
        }
 }


Other related posts: