From 06878dd230569add279019d670f7fb14d1cc368b Mon Sep 17 00:00:00 2001 From: Paul Pluzhnikov Date: Tue, 7 Jul 2009 21:03:00 +0000 Subject: [PATCH] 2009-07-07 Paul Pluzhnikov * python/python-value.c (valpy_getitem): Remove incorrect assert. --- gdb/ChangeLog | 4 ++++ gdb/python/python-value.c | 11 ++--------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1178a93ddf7..e54fd1336d9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2009-07-07 Paul Pluzhnikov + + * python/python-value.c (valpy_getitem): Remove incorrect assert. + 2009-07-07 Paul Pluzhnikov * python/python-value.c (valpy_getitem): Don't return from TRY_CATCH. diff --git a/gdb/python/python-value.c b/gdb/python/python-value.c index 948ff06d366..a0bf2db6204 100644 --- a/gdb/python/python-value.c +++ b/gdb/python/python-value.c @@ -294,17 +294,10 @@ valpy_getitem (PyObject *self, PyObject *key) } } - if (res_val == NULL) - { - gdb_assert (field == NULL); - return NULL; - } - - if (field) - xfree (field); + xfree (field); GDB_PY_HANDLE_EXCEPTION (except); - return value_to_value_object (res_val); + return res_val ? value_to_value_object (res_val) : NULL; } static int -- 2.30.2