]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2009-07-07 Paul Pluzhnikov <ppluzhnikov@google.com>
authorPaul Pluzhnikov <ppluzhnikov@google.com>
Tue, 7 Jul 2009 21:03:00 +0000 (21:03 +0000)
committerPaul Pluzhnikov <ppluzhnikov@google.com>
Tue, 7 Jul 2009 21:03:00 +0000 (21:03 +0000)
* python/python-value.c (valpy_getitem): Remove incorrect assert.

gdb/ChangeLog
gdb/python/python-value.c

index 1178a93ddf789a06e8e8492cebf1399f2ab3bb1d..e54fd1336d9756ea2f9184a2fd333dc48b7f216f 100644 (file)
@@ -1,3 +1,7 @@
+2009-07-07  Paul Pluzhnikov  <ppluzhnikov@google.com>
+
+       * python/python-value.c (valpy_getitem): Remove incorrect assert.
+       
 2009-07-07  Paul Pluzhnikov  <ppluzhnikov@google.com>
 
        * python/python-value.c (valpy_getitem): Don't return from TRY_CATCH.
index 948ff06d366859e80d1b56ee98f465c18eb0327a..a0bf2db6204a027996117dff33fa01b08c8f364e 100644 (file)
@@ -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