[gtk/wip/matthiasc/popup5: 218/234] inspector: Avoid a critical warning
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/popup5: 218/234] inspector: Avoid a critical warning
- Date: Mon, 27 May 2019 13:40:27 +0000 (UTC)
commit 969e96a27268da732be46d51f7f182cb93280f28
Author: Matthias Clasen <mclasen redhat com>
Date: Wed May 22 00:43:04 2019 +0000
inspector: Avoid a critical warning
gtk/inspector/visual.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gtk/inspector/visual.c b/gtk/inspector/visual.c
index 000c7673a0..df3fe1bdf8 100644
--- a/gtk/inspector/visual.c
+++ b/gtk/inspector/visual.c
@@ -90,10 +90,9 @@ struct _GtkInspectorVisualPrivate
G_DEFINE_TYPE_WITH_PRIVATE (GtkInspectorVisual, gtk_inspector_visual, GTK_TYPE_SCROLLED_WINDOW)
static void
-fix_direction_recurse (GtkWidget *widget,
- gpointer data)
+fix_direction_recurse (GtkWidget *widget,
+ GtkTextDirection dir)
{
- GtkTextDirection dir = GPOINTER_TO_INT (data);
GtkWidget *child;
g_object_ref (widget);
@@ -103,7 +102,7 @@ fix_direction_recurse (GtkWidget *widget,
child != NULL;
child = gtk_widget_get_next_sibling (child))
{
- fix_direction_recurse (child, data);
+ fix_direction_recurse (child, dir);
}
g_object_unref (widget);
@@ -114,7 +113,7 @@ static GtkTextDirection initial_direction;
static void
fix_direction (GtkWidget *iw)
{
- fix_direction_recurse (iw, GINT_TO_POINTER (initial_direction));
+ fix_direction_recurse (iw, initial_direction);
}
static void
@@ -124,7 +123,8 @@ direction_changed (GtkComboBox *combo)
const gchar *direction;
iw = GTK_WIDGET (gtk_widget_get_root (GTK_WIDGET (combo)));
- fix_direction (iw);
+ if (iw)
+ fix_direction (iw);
direction = gtk_combo_box_get_active_id (combo);
if (g_strcmp0 (direction, "ltr") == 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]