summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/pychrysalide')
-rw-r--r--plugins/pychrysalide/gui/core/global.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/plugins/pychrysalide/gui/core/global.c b/plugins/pychrysalide/gui/core/global.c
index a3b62ee..80c2c60 100644
--- a/plugins/pychrysalide/gui/core/global.c
+++ b/plugins/pychrysalide/gui/core/global.c
@@ -76,10 +76,17 @@ static PyObject *py_global_get_editor_builder(PyObject *self, PyObject *args)
)
builder = get_editor_builder();
- assert(builder != NULL);
- result = pygobject_new(G_OBJECT(builder));
- g_object_unref(G_OBJECT(builder));
+ if (builder != NULL)
+ {
+ result = pygobject_new(G_OBJECT(builder));
+ g_object_unref(G_OBJECT(builder));
+ }
+ else
+ {
+ result = Py_None;
+ Py_INCREF(result);
+ }
return result;