From 74f910c87c017f1f232e7a8f67daafc8072c1089 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 15 Oct 2012 15:20:27 +0000 Subject: PR python/14634: * python/py-symbol.c (sympy_dealloc): Check for NULL symbol. testsuite * gdb.python/py-symbol.exp: Test symbol destructor. --- gdb/python/py-symbol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/python') 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); -- cgit v1.1