mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-16 21:50:34 +00:00
inspector: Avoid crash in magnifier
We can't use gtk_widget_draw on widgets that are not allocated.
This commit is contained in:
parent
e0f31ab7bb
commit
dc407dbc8f
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user