aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-10-15 15:20:27 +0000
committerTom Tromey <tromey@redhat.com>2012-10-15 15:20:27 +0000
commit74f910c87c017f1f232e7a8f67daafc8072c1089 (patch)
tree9439ef94297fd2b5a8dd0c4bf8ea1fbab307c018 /gdb/python
parentb7a54b5525ad5f927af8205463294664f493f211 (diff)
downloadgdb-74f910c87c017f1f232e7a8f67daafc8072c1089.zip
gdb-74f910c87c017f1f232e7a8f67daafc8072c1089.tar.gz
gdb-74f910c87c017f1f232e7a8f67daafc8072c1089.tar.bz2
PR python/14634:
* python/py-symbol.c (sympy_dealloc): Check for NULL symbol. testsuite * gdb.python/py-symbol.exp: Test symbol destructor.
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/py-symbol.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/python/py-symbol.c b/gdb/python/py-symbol.c
index 00a8477..83d272e 100644
--- a/gdb/python/py-symbol.c
+++ b/gdb/python/py-symbol.c
@@ -335,7 +335,7 @@ sympy_dealloc (PyObject *obj)
if (sym_obj->prev)
sym_obj->prev->next = sym_obj->next;
- else if (SYMBOL_SYMTAB (sym_obj->symbol))
+ else if (sym_obj->symbol && SYMBOL_SYMTAB (sym_obj->symbol))
{
set_objfile_data (SYMBOL_SYMTAB (sym_obj->symbol)->objfile,
sympy_objfile_data_key, sym_obj->next);