diff options
Diffstat (limited to 'gdb/python/py-progspace.c')
-rw-r--r-- | gdb/python/py-progspace.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/python/py-progspace.c b/gdb/python/py-progspace.c index e1258c76254..6fc53cb95d3 100644 --- a/gdb/python/py-progspace.c +++ b/gdb/python/py-progspace.c @@ -97,7 +97,10 @@ static int pspy_initialize (pspace_object *self) { self->pspace = NULL; - self->dict = NULL; + + self->dict = PyDict_New (); + if (self->dict == NULL) + return 0; self->printers = PyList_New (0); if (self->printers == NULL) |