pixbuf engine: Avoid a crash if widget is NULL
Commit 85f2a721cf
introduced an unconditional call to
gtk_widget_get_direction(). This does not work for 'foreign'
uses of the theme engine, e.g. in Qt, where widget is NULL.
This was reported as a crash in Fedora here:
https://bugzilla.redhat.com/show_bug.cgi?id=924683
This commit is contained in:
@ -131,7 +131,7 @@ draw_simple_image(GtkStyle *style,
|
||||
match_data->orientation = GTK_ORIENTATION_HORIZONTAL;
|
||||
}
|
||||
|
||||
if (!(match_data->flags & THEME_MATCH_DIRECTION))
|
||||
if (widget && !(match_data->flags & THEME_MATCH_DIRECTION))
|
||||
{
|
||||
match_data->flags |= THEME_MATCH_DIRECTION;
|
||||
match_data->direction = gtk_widget_get_direction (widget);
|
||||
|
Reference in New Issue
Block a user