summaryrefslogtreecommitdiff
path: root/frontends/gtk/compat.c
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/gtk/compat.c')
-rw-r--r--frontends/gtk/compat.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/frontends/gtk/compat.c b/frontends/gtk/compat.c
index a8321d6d4..bd3f46ee5 100644
--- a/frontends/gtk/compat.c
+++ b/frontends/gtk/compat.c
@@ -635,7 +635,9 @@ void nsgtk_widget_set_margins(GtkWidget *widget, gint hmargin, gint vmargin)
gtk_widget_set_margin_top(widget, vmargin);
gtk_widget_set_margin_bottom(widget, vmargin);
#else
- gtk_misc_set_padding(GTK_MISC(widget), hmargin, vmargin);
+ if (GTK_IS_MISC(widget)) {
+ gtk_misc_set_padding(GTK_MISC(widget), hmargin, vmargin);
+ }
#endif
}