summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-12-12 17:07:05 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-12-12 17:07:05 (GMT)
commitc806bc75910c129c6d78115cfdc571316e060412 (patch)
tree3752138befa5508fe43ea3410237c5edb1163cbf /src/core
parentd5b598b14fd4c50847ce536692ded258ba1720ca (diff)
Reorganized the global variables access in the Python bindings.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/global.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/global.c b/src/core/global.c
index 8736b30..3777fd9 100644
--- a/src/core/global.c
+++ b/src/core/global.c
@@ -261,9 +261,8 @@ void set_current_project(GStudyProject *project)
GStudyProject *get_current_project(void)
{
- assert(_project != NULL);
-
- g_object_ref(G_OBJECT(_project));
+ if (_project != NULL)
+ g_object_ref(G_OBJECT(_project));
return _project;