[libgda/gtk3] GdaBrowser: crasher correction



commit ed163fcd995e46219a28ca2c2b999c60f511fcca
Author: Vivien Malerba <malerba gnome-db org>
Date:   Wed Feb 9 18:01:21 2011 +0100

    GdaBrowser: crasher correction

 tools/browser/query-exec/query-editor.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/tools/browser/query-exec/query-editor.c b/tools/browser/query-exec/query-editor.c
index 6e369dc..054533b 100644
--- a/tools/browser/query-exec/query-editor.c
+++ b/tools/browser/query-exec/query-editor.c
@@ -1,5 +1,5 @@
 /* GNOME DB library
- * Copyright (C) 1999 - 2010 The GNOME Foundation.
+ * Copyright (C) 1999 - 2011 The GNOME Foundation.
  *
  * AUTHORS:
  *      Rodrigo Moya <rodrigo gnome-db org>
@@ -1273,8 +1273,10 @@ query_editor_start_history_batch (QueryEditor *editor, QueryEditorHistoryBatch *
 		query_editor_history_batch_unref (hist_batch);
 
 	/* add timout to 1 sec. */
-	editor->priv->ts_timeout_id  = g_timeout_add_seconds (60,
-							      (GSourceFunc) timestamps_update_cb, editor);
+	if (editor->priv->ts_timeout_id == 0)
+		editor->priv->ts_timeout_id  = g_timeout_add_seconds (60,
+								      (GSourceFunc) timestamps_update_cb,
+								      editor);
 
 	/* remove too old batches */
 	if (g_slist_length (editor->priv->batches_list) > MAX_HISTORY_BATCH_ITEMS) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]