[haiku-commits] haiku: hrev44745 - src/apps/debugger/user_interface/gui/inspector_window

  • From: anevilyak@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 4 Nov 2012 09:10:01 +0100 (CET)

hrev44745 adds 1 changeset to branch 'master'
old head: a6de493213ff3ff2700469fb45ddb1b39ab15c14
new head: 674bc405892293408a69490937a59e102bf8ffc1

----------------------------------------------------------------------------

674bc40: Fix reference problem in InspectorWindow.
  
  On quit, the inspector window needs to detach itself from its current
  block and release its reference. Otherwise the next attempt to inspect
  the same block will crash since it still contains the deleted window
  in its listener list. Also fixes leaking blocks.

                                      [ Rene Gollent <anevilyak@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev44745
Commit:      674bc405892293408a69490937a59e102bf8ffc1
URL:         http://cgit.haiku-os.org/haiku/commit/?id=674bc40
Author:      Rene Gollent <anevilyak@xxxxxxxxx>
Date:        Sat Nov  3 22:00:40 2012 UTC

----------------------------------------------------------------------------

1 file changed, 5 insertions(+)
.../user_interface/gui/inspector_window/InspectorWindow.cpp      | 5 +++++

----------------------------------------------------------------------------

diff --git 
a/src/apps/debugger/user_interface/gui/inspector_window/InspectorWindow.cpp 
b/src/apps/debugger/user_interface/gui/inspector_window/InspectorWindow.cpp
index 5d28932..5dbb108 100644
--- a/src/apps/debugger/user_interface/gui/inspector_window/InspectorWindow.cpp
+++ b/src/apps/debugger/user_interface/gui/inspector_window/InspectorWindow.cpp
@@ -52,6 +52,11 @@ InspectorWindow::InspectorWindow(::Team* team, 
UserInterfaceListener* listener,
 
 InspectorWindow::~InspectorWindow()
 {
+       if (fCurrentBlock != NULL)
+       {
+               fCurrentBlock->RemoveListener(this);
+               fCurrentBlock->ReleaseReference();
+       }
 }
 
 


Other related posts:

  • » [haiku-commits] haiku: hrev44745 - src/apps/debugger/user_interface/gui/inspector_window - anevilyak