diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-04-08 16:56:09 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-04-08 16:56:09 (GMT) |
commit | 35436b655975ac849c7432d736ef379f500c545b (patch) | |
tree | f9c7078e7dbff73ad6ca86bc002204f15f09ba22 /src/core | |
parent | 4f2f4cd9a26e08a68bec5da303e30341b8cae264 (diff) |
Avoided to create a hidden main window in batch mode.
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/global.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/global.c b/src/core/global.c index 2deb9f7..b227a5d 100644 --- a/src/core/global.c +++ b/src/core/global.c @@ -95,13 +95,16 @@ void set_current_project(GStudyProject *project) { if (_project != NULL) { - _project_notify(_project, false); + if (_project_notify != NULL) + _project_notify(_project, false); + g_object_unref(G_OBJECT(_project)); + } _project = project; - if (_project != NULL) + if (_project != NULL && _project_notify != NULL) _project_notify(_project, true); } |