summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gobject/pygflags.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gobject/pygflags.c b/gobject/pygflags.c
index d6388bb..9e0fab3 100644
--- a/gobject/pygflags.c
+++ b/gobject/pygflags.c
@@ -88,8 +88,12 @@ pyg_flags_repr(PyGFlags *self)
tmp = generate_repr(self->gtype, self->parent.ob_ival);
- retval = g_strdup_printf("<flags %s of type %s>", tmp,
- g_type_name(self->gtype));
+ if (tmp)
+ retval = g_strdup_printf("<flags %s of type %s>", tmp,
+ g_type_name(self->gtype));
+ else
+ retval = g_strdup_printf("<flags %ld of type %s>", self->parent.ob_ival,
+ g_type_name(self->gtype));
g_free(tmp);
pyretval = PyString_FromString(retval);