MetaSurfaceActorWayland: Don't dereference surface before NULL check

Fixes regression introduced in ba7c524a18.

https://bugzilla.gnome.org/show_bug.cgi?id=744453
This commit is contained in:
Jonas Ådahl 2015-07-15 17:08:44 +08:00
parent f295349e26
commit 5d10196919

View File

@ -108,10 +108,10 @@ meta_surface_actor_wayland_get_scale (MetaSurfaceActorWayland *actor)
{
MetaSurfaceActorWaylandPrivate *priv = meta_surface_actor_wayland_get_instance_private (actor);
MetaWaylandSurface *surface = priv->surface;
MetaWindow *window = surface->window;
MetaWindow *window = NULL;
int output_scale = 1;
if (!priv->surface)
if (!surface)
return 1;
while (surface)