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

  • From: anevilyak@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 26 Jun 2013 00:05:05 +0200 (CEST)

hrev45792 adds 1 changeset to branch 'master'
old head: b906e10a5d3681c1a23008f85ff01ee30086d439
new head: bbbe023af3dbd927833cd006a6377ce7e96f4c44
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=bbbe023+%5Eb906e10

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

bbbe023: InspectorWindow: slight behaviorial tweak in failure case.
  
  Don't release the reference to the current block until we get the
  notification that the next block has been retrieved. Otherwise, the
  previous/next block buttons would cease to work if the requested block
  failed to be retrieved.

                                      [ Rene Gollent <anevilyak@xxxxxxxxx> ]

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

Revision:    hrev45792
Commit:      bbbe023af3dbd927833cd006a6377ce7e96f4c44
URL:         http://cgit.haiku-os.org/haiku/commit/?id=bbbe023
Author:      Rene Gollent <anevilyak@xxxxxxxxx>
Date:        Tue Jun 25 22:03:49 2013 UTC

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

1 file changed, 6 insertions(+), 8 deletions(-)
.../gui/inspector_window/InspectorWindow.cpp           | 14 ++++++--------

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

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 333fa30..f674ff3 100644
--- a/src/apps/debugger/user_interface/gui/inspector_window/InspectorWindow.cpp
+++ b/src/apps/debugger/user_interface/gui/inspector_window/InspectorWindow.cpp
@@ -221,15 +221,10 @@ InspectorWindow::MessageReceived(BMessage* message)
 
                        if (addressValid) {
                                fCurrentAddress = address;
-                               if (fCurrentBlock != NULL
-                                       && !fCurrentBlock->Contains(address)) {
-                                       fCurrentBlock->ReleaseReference();
-                                       fCurrentBlock = NULL;
-                               }
-
-                               if (fCurrentBlock == NULL)
+                               if (fCurrentBlock == NULL
+                                       || !fCurrentBlock->Contains(address)) {
                                        fListener->InspectRequested(address, 
this);
-                               else
+                               } else
                                        
fMemoryView->SetTargetAddress(fCurrentBlock, address);
                        }
                        break;
@@ -266,6 +261,9 @@ InspectorWindow::MessageReceived(BMessage* message)
                        }
 
                        if (result == B_OK) {
+                               if (fCurrentBlock != NULL)
+                                       fCurrentBlock->ReleaseReference();
+
                                fCurrentBlock = block;
                                fMemoryView->SetTargetAddress(block, 
fCurrentAddress);
                                fPreviousBlockButton->SetEnabled(true);


Other related posts:

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