summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorChristian Hergert <christian@hergert.me>2015-11-18 14:41:29 -0800
committerChristian Hergert <christian@hergert.me>2015-11-18 14:41:29 -0800
commit0a0213bc1cfdf20e381e5de069346e16bffe6eb1 (patch)
tree5d8968a102f76788f5771a7d927523bde008e71a /gtk
parentbb441f4488f49f6a60d0b45795fc65da3433cbbb (diff)
downloadgtk+-0a0213bc1cfdf20e381e5de069346e16bffe6eb1.tar.gz
entry: ensure valid GdkWindow before set_invisible_cursor()
If the window has not yet been created, then we can't set the invisible cursor yet. This can happen in situations where the widget is in a revealer with type-to-search functionality.
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkentry.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 91ac223c59..2ac7964c9a 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -4853,9 +4853,11 @@ gtk_entry_obscure_mouse_cursor (GtkEntry *entry)
if (priv->mouse_cursor_obscured)
return;
- set_invisible_cursor (priv->text_area);
-
- priv->mouse_cursor_obscured = TRUE;
+ if (priv->text_area)
+ {
+ set_invisible_cursor (priv->text_area);
+ priv->mouse_cursor_obscured = TRUE;
+ }
}
static gint