[gtk+] gtkentrycompletion: fix a critical warning



commit 578d43c2baf850e56b14f6085583dde86f09bb0f
Author: Claudio Saavedra <csaavedra igalia com>
Date:   Thu Mar 6 16:34:10 2014 +0200

    gtkentrycompletion: fix a critical warning
    
    There are early returns in this method before the completion timeout
    is set later on, so set the source to 0 to avoid trying to remove it
    later again.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=725824

 gtk/gtkentrycompletion.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c
index aa63666..7151080 100644
--- a/gtk/gtkentrycompletion.c
+++ b/gtk/gtkentrycompletion.c
@@ -2491,7 +2491,10 @@ gtk_entry_completion_changed (GtkWidget *widget,
 
   /* (re)install completion timeout */
   if (completion->priv->completion_timeout)
+  {
     g_source_remove (completion->priv->completion_timeout);
+    completion->priv->completion_timeout = 0;
+  }
 
   if (!gtk_entry_get_text (entry))
     return;


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