Remove signal handler when closing

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
Sebastian Ramacher 2016-01-20 02:21:15 +01:00
parent 274809be41
commit 2da759149b

View file

@ -93,7 +93,8 @@ zathura_create(void)
}
/* UI */
if ((zathura->ui.session = girara_session_create()) == NULL) {
zathura->ui.session = girara_session_create();
if (zathura->ui.session == NULL) {
goto error_out;
}
@ -326,6 +327,13 @@ zathura_free(zathura_t* zathura)
document_close(zathura, false);
#ifdef G_OS_UNIX
if (zathura->signals.sigterm > 0) {
g_source_remove(zathura->signals.sigterm);
zathura->signals.sigterm = 0;
}
#endif
/* stop D-Bus */
if (zathura->dbus != NULL) {
g_object_unref(zathura->dbus);