aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-record.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python/py-record.c')
-rw-r--r--gdb/python/py-record.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/python/py-record.c b/gdb/python/py-record.c
index 7e7904b..89c2e77 100644
--- a/gdb/python/py-record.c
+++ b/gdb/python/py-record.c
@@ -696,6 +696,9 @@ gdbpy_current_recording (PyObject *self, PyObject *args)
Py_RETURN_NONE;
ret = PyObject_New (recpy_record_object, &recpy_record_type);
+ if (ret == nullptr)
+ return nullptr;
+
ret->thread = inferior_thread ();
ret->method = target_record_method (ret->thread->ptid);