Blame gcut-egg-fix-a-bug-that-timeout-source-is-removed-twice.patch
|
|
39b8d2a |
From dd77d7b6471c12a3654ea3745bf3d639dba1b3ce Mon Sep 17 00:00:00 2001
|
|
|
39b8d2a |
From: Kouhei Sutou <kou@clear-code.com>
|
|
|
39b8d2a |
Date: Thu, 15 Jan 2015 21:55:02 +0900
|
|
|
39b8d2a |
Subject: [PATCH 4/4] gcut egg: fix a bug that timeout source is removed twice
|
|
|
39b8d2a |
|
|
|
39b8d2a |
Signed-off-by: HAYASHI Kentaro <kenhys@gmail.com>
|
|
|
39b8d2a |
---
|
|
|
39b8d2a |
gcutter/gcut-egg.c | 6 ++++--
|
|
|
39b8d2a |
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
39b8d2a |
|
|
|
39b8d2a |
diff --git a/gcutter/gcut-egg.c b/gcutter/gcut-egg.c
|
|
|
39b8d2a |
index f4f0101..ac5c414 100644
|
|
|
39b8d2a |
--- a/gcutter/gcut-egg.c
|
|
|
39b8d2a |
+++ b/gcutter/gcut-egg.c
|
|
|
39b8d2a |
@@ -342,7 +342,8 @@ dispose (GObject *object)
|
|
|
39b8d2a |
&is_timeout);
|
|
|
39b8d2a |
while (!is_timeout && priv->process_watch_id > 0 && priv->pid > 0)
|
|
|
39b8d2a |
g_main_context_iteration(NULL, TRUE);
|
|
|
39b8d2a |
- g_source_remove(timeout_wait_id);
|
|
|
39b8d2a |
+ if (!is_timeout)
|
|
|
39b8d2a |
+ g_source_remove(timeout_wait_id);
|
|
|
39b8d2a |
}
|
|
|
39b8d2a |
}
|
|
|
39b8d2a |
|
|
|
39b8d2a |
@@ -874,7 +875,8 @@ gcut_egg_wait (GCutEgg *egg, guint timeout, GError **error)
|
|
|
39b8d2a |
timeout_id = g_timeout_add(timeout, cb_timeout_wait, &is_timeout);
|
|
|
39b8d2a |
while (!is_timeout && priv->pid > 0)
|
|
|
39b8d2a |
g_main_context_iteration(NULL, TRUE);
|
|
|
39b8d2a |
- g_source_remove(timeout_id);
|
|
|
39b8d2a |
+ if (!is_timeout)
|
|
|
39b8d2a |
+ g_source_remove(timeout_id);
|
|
|
39b8d2a |
|
|
|
39b8d2a |
if (is_timeout) {
|
|
|
39b8d2a |
gchar *command;
|
|
|
39b8d2a |
--
|
|
|
39b8d2a |
2.1.0
|
|
|
39b8d2a |
|