[gtk+/wip/baedert/children: 6/13] csswidgetnode: Don't assume parent widgets are always containers
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/children: 6/13] csswidgetnode: Don't assume parent widgets are always containers
- Date: Fri, 18 Nov 2016 09:18:25 +0000 (UTC)
commit 4a90a69f50991defba92830877131cfa5afebac9
Author: Timm Bäder <mail baedert org>
Date: Fri Nov 18 09:53:15 2016 +0100
csswidgetnode: Don't assume parent widgets are always containers
gtk/gtkcsswidgetnode.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkcsswidgetnode.c b/gtk/gtkcsswidgetnode.c
index 4e63c3f..63cc455 100644
--- a/gtk/gtkcsswidgetnode.c
+++ b/gtk/gtkcsswidgetnode.c
@@ -170,11 +170,14 @@ widget_needs_widget_path (GtkWidget *widget)
if (parent == NULL)
return FALSE;
- parent_func = GTK_CONTAINER_GET_CLASS (GTK_CONTAINER (parent))->get_path_for_child;
- for (i = 0; i < G_N_ELEMENTS (funcs); i++)
+ if (GTK_IS_CONTAINER (parent))
{
- if (funcs[i] == parent_func)
- return FALSE;
+ parent_func = GTK_CONTAINER_GET_CLASS (GTK_CONTAINER (parent))->get_path_for_child;
+ for (i = 0; i < G_N_ELEMENTS (funcs); i++)
+ {
+ if (funcs[i] == parent_func)
+ return FALSE;
+ }
}
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]