aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
authorPaul Pluzhnikov <ppluzhnikov@google.com>2009-07-07 21:03:00 +0000
committerPaul Pluzhnikov <ppluzhnikov@google.com>2009-07-07 21:03:00 +0000
commit06878dd230569add279019d670f7fb14d1cc368b (patch)
tree844320bd37f931b361c9f8d42770486d019130d3 /gdb/python
parent570e2b1a04ef8ec53e236b0bdd2fae2c777e3268 (diff)
downloadgdb-06878dd230569add279019d670f7fb14d1cc368b.zip
gdb-06878dd230569add279019d670f7fb14d1cc368b.tar.gz
gdb-06878dd230569add279019d670f7fb14d1cc368b.tar.bz2
2009-07-07 Paul Pluzhnikov <ppluzhnikov@google.com>
* python/python-value.c (valpy_getitem): Remove incorrect assert.
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/python-value.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/gdb/python/python-value.c b/gdb/python/python-value.c
index 948ff06..a0bf2db 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