diff options
Diffstat (limited to 'gdb/varobj.c')
-rw-r--r-- | gdb/varobj.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/varobj.c b/gdb/varobj.c index 7928d90..d0c857a 100644 --- a/gdb/varobj.c +++ b/gdb/varobj.c @@ -1844,10 +1844,12 @@ varobj::~varobj () } #endif + /* This must be deleted before the root object, because Python-based + destructors need access to some components. */ + delete var->dynamic; + if (is_root_p (var)) delete var->root; - - delete var->dynamic; } /* Return the type of the value that's stored in VAR, |