mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
handle actual GObject having been set to NULL in repr
(For example, when doing weak ref tracking)
This commit is contained in:
parent
0d55256c9f
commit
f4865eb427
1 changed files with 3 additions and 1 deletions
|
@ -47,7 +47,9 @@ _wrap_gst_object_tp_repr (PyObject * self)
|
|||
|
||||
repr = g_strdup_printf ("<%s object (%s) at 0x%lx>",
|
||||
self->ob_type->tp_name,
|
||||
GST_OBJECT_NAME (object) ? GST_OBJECT_NAME (object) : "unnamed",
|
||||
object ? (
|
||||
GST_OBJECT_NAME (object) ? GST_OBJECT_NAME (object) : "unnamed"
|
||||
) : "(null)",
|
||||
(long) self);
|
||||
ret = PyString_FromString (repr);
|
||||
g_free (repr);
|
||||
|
|
Loading…
Reference in a new issue