[gtk+/touch-selection-improvements: 17/17] texthandle: check there is a widget to set state on
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/touch-selection-improvements: 17/17] texthandle: check there is a widget to set state on
- Date: Thu, 18 Dec 2014 13:55:41 +0000 (UTC)
commit e0ac74b50e3dad06caf0bf741bb2b4fe42605ef3
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Dec 18 14:52:11 2014 +0100
texthandle: check there is a widget to set state on
The handle widgets might be uninitialized, just skip those if they aren't
there yet.
gtk/gtktexthandle.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtktexthandle.c b/gtk/gtktexthandle.c
index 893dde2..eeaa7e7 100644
--- a/gtk/gtktexthandle.c
+++ b/gtk/gtktexthandle.c
@@ -177,6 +177,9 @@ gtk_text_handle_set_state (GtkTextHandle *handle,
for (i = 0; i <= GTK_TEXT_HANDLE_POSITION_SELECTION_START; i++)
{
+ if (!priv->windows[i].widget)
+ continue;
+
gtk_widget_set_state_flags (priv->windows[i].widget, state, TRUE);
gtk_widget_queue_draw (priv->windows[i].widget);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]