Commit 5eb839e4 authored by Felix Riemann's avatar Felix Riemann

EogWindow: Don't unref timer sources before destroying them

This could cause segfaults if the source was no longer attached
to the mainloop. Fixes #50.
parent 623a9a7e
......@@ -1791,8 +1791,8 @@ fullscreen_clear_timeout (EogWindow *window)
eog_debug (DEBUG_WINDOW);
if (window->priv->fullscreen_timeout_source != NULL) {
g_source_unref (window->priv->fullscreen_timeout_source);
g_source_destroy (window->priv->fullscreen_timeout_source);
g_source_unref (window->priv->fullscreen_timeout_source);
}
window->priv->fullscreen_timeout_source = NULL;
......@@ -1823,8 +1823,8 @@ slideshow_clear_timeout (EogWindow *window)
eog_debug (DEBUG_WINDOW);
if (window->priv->slideshow_switch_source != NULL) {
g_source_unref (window->priv->slideshow_switch_source);
g_source_destroy (window->priv->slideshow_switch_source);
g_source_unref (window->priv->slideshow_switch_source);
}
window->priv->slideshow_switch_source = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment