After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 650114 - [PATCH] gtk_entry_set_completion does not destroy idle source
[PATCH] gtk_entry_set_completion does not destroy idle source
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkEntry
2.24.x
Other All
: Normal major
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2011-05-13 15:00 UTC by John Lindgren
Modified: 2011-06-01 00:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (479 bytes, patch)
2011-05-13 15:00 UTC, John Lindgren
accepted-commit_now Details | Review

Description John Lindgren 2011-05-13 15:00:48 UTC
Created attachment 187773 [details] [review]
Patch

In gtkentry.c, check_completion_callback() runs as an idle callback when the text in the entry has been changed.  However, the idle source is not removed when the entry's completion is set to NULL, triggering bug #650110 and causing a segfault.  Attached patch removes the idle source when gtk_entry_set_completion is called.

(As noted on #650110, this is triggered by the current git version of pcmanfm, but the bug is here in GTK, not in pcmanfm.)
Comment 1 Matthias Clasen 2011-05-16 18:28:54 UTC
Review of attachment 187773 [details] [review]:

Good catch, thanks.