inspector: Avoid crash in magnifier

We can't use gtk_widget_draw on widgets that are not allocated.
This commit is contained in:
Matthias Clasen 2016-02-08 09:34:24 +01:00
parent e0f31ab7bb
commit dc407dbc8f

View File

@ -49,7 +49,7 @@ gtk_inspector_magnifier_set_object (GtkInspectorMagnifier *sl,
sl->priv->object = NULL;
if (!GTK_IS_WIDGET (object))
if (!GTK_IS_WIDGET (object) || !gtk_widget_is_visible (GTK_WIDGET (object)))
{
gtk_widget_hide (GTK_WIDGET (sl));
_gtk_magnifier_set_inspected (GTK_MAGNIFIER (sl->priv->magnifier), NULL);