|
From: Kouhei S. <nul...@cl...> - 2015-01-15 12:55:28
|
Kouhei Sutou 2015-01-15 21:55:02 +0900 (Thu, 15 Jan 2015) New Revision: dd77d7b6471c12a3654ea3745bf3d639dba1b3ce https://github.com/clear-code/cutter/commit/dd77d7b6471c12a3654ea3745bf3d639dba1b3ce Message: gcut egg: fix a bug that timeout source is removed twice Modified files: gcutter/gcut-egg.c Modified: gcutter/gcut-egg.c (+4 -2) =================================================================== --- gcutter/gcut-egg.c 2015-01-15 21:53:16 +0900 (f4f0101) +++ gcutter/gcut-egg.c 2015-01-15 21:55:02 +0900 (ac5c414) @@ -342,7 +342,8 @@ dispose (GObject *object) &is_timeout); while (!is_timeout && priv->process_watch_id > 0 && priv->pid > 0) g_main_context_iteration(NULL, TRUE); - g_source_remove(timeout_wait_id); + if (!is_timeout) + g_source_remove(timeout_wait_id); } } @@ -874,7 +875,8 @@ gcut_egg_wait (GCutEgg *egg, guint timeout, GError **error) timeout_id = g_timeout_add(timeout, cb_timeout_wait, &is_timeout); while (!is_timeout && priv->pid > 0) g_main_context_iteration(NULL, TRUE); - g_source_remove(timeout_id); + if (!is_timeout) + g_source_remove(timeout_id); if (is_timeout) { gchar *command; |