[nemiver/gtk2-branch] Reference the local var inspector view



commit 3f2494ed99bf05e99e4d5f0f8412093d414f8b49
Author: Dodji Seketeli <dodji seketeli org>
Date:   Thu Jun 9 01:55:58 2011 +0200

    Reference the local var inspector view
    
    	* src/persp/dbgperspective/nmv-local-vars-inspector.cc
    	(LocalVarsInspector::Priv::Priv): Add a reference on the tree_view
    	component we have here otherwise we'd unreference it after gtk got
    	rid of the widget it has.

 .../dbgperspective/nmv-local-vars-inspector.cc     |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/persp/dbgperspective/nmv-local-vars-inspector.cc b/src/persp/dbgperspective/nmv-local-vars-inspector.cc
index 9d372a5..593d752 100644
--- a/src/persp/dbgperspective/nmv-local-vars-inspector.cc
+++ b/src/persp/dbgperspective/nmv-local-vars-inspector.cc
@@ -93,7 +93,10 @@ public:
         module_manager (0)
     {
         LOG_FUNCTION_SCOPE_NORMAL_DD;
-
+        // We are going to unref the tree_view when an instance of
+        // this type is going to be distroyed.  So we need to hold a
+        // reference on tree_view.
+        tree_view.reference ();
         THROW_IF_FAIL (a_debugger);
         debugger = a_debugger;
         THROW_IF_FAIL (tree_view);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]