[gtk/wip/baedert/for-master] inspector: Avoid some failing casts
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master] inspector: Avoid some failing casts
- Date: Sat, 1 Aug 2020 06:57:06 +0000 (UTC)
commit 911503e7ef088137eccdbaf09c04d59b6b0157c4
Author: Timm Bäder <mail baedert org>
Date: Sat Aug 1 08:56:34 2020 +0200
inspector: Avoid some failing casts
We might be inspecting a non-widget here, so can't just cast that.
gtk/inspector/window.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/gtk/inspector/window.c b/gtk/inspector/window.c
index 7d7ec56f4b..61b3a9aed9 100644
--- a/gtk/inspector/window.c
+++ b/gtk/inspector/window.c
@@ -919,9 +919,15 @@ update_go_buttons (GtkInspectorWindow *iw)
switch (kind)
{
case CHILD_KIND_WIDGET:
- update_go_button (iw->go_down_button, gtk_widget_get_first_child (GTK_WIDGET (object)) != NULL, "First
child");
- update_go_button (iw->go_previous_button, gtk_widget_get_prev_sibling (GTK_WIDGET (object)) != NULL,
"Previous sibling");
- update_go_button (iw->go_next_button, gtk_widget_get_next_sibling (GTK_WIDGET (object)) != NULL, "Next
sibling");
+ update_go_button (iw->go_down_button,
+ GTK_IS_WIDGET (object) &>k_widget_get_first_child (GTK_WIDGET (object)) != NULL,
+ "First child");
+ update_go_button (iw->go_previous_button,
+ GTK_IS_WIDGET (object) && gtk_widget_get_prev_sibling (GTK_WIDGET (object)) != NULL,
+ "Previous sibling");
+ update_go_button (iw->go_next_button,
+ GTK_IS_WIDGET (object) && gtk_widget_get_next_sibling (GTK_WIDGET (object)) != NULL,
+ "Next sibling");
gtk_widget_hide (iw->list_position_label);
break;
case CHILD_KIND_LISTITEM:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]