[gtk+] entry: Avoid criticals
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] entry: Avoid criticals
- Date: Mon, 8 Jun 2015 23:05:34 +0000 (UTC)
commit ca077a085c88f67738b8237beb2316e031ec7281
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jun 8 19:04:06 2015 -0400
entry: Avoid criticals
After the recent changes, we could end up calling
gtk_entry_update_handles in cases where the text_handle
has not be created (e.g. when dragging text from an entry).
Avoid that.
gtk/gtkentry.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index c617a92..eb83363 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -4574,7 +4574,8 @@ gtk_entry_multipress_gesture_pressed (GtkGestureMultiPress *gesture,
gtk_gesture_set_state (priv->drag_gesture,
GTK_EVENT_SEQUENCE_CLAIMED);
- gtk_entry_update_handles (entry, mode);
+ if (priv->text_handle)
+ gtk_entry_update_handles (entry, mode);
}
if (n_press >= 3)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]