From 5d1019691935bc24758aff4571d2ef5cae48720a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Wed, 15 Jul 2015 17:08:44 +0800 Subject: [PATCH] MetaSurfaceActorWayland: Don't dereference surface before NULL check Fixes regression introduced in ba7c524a18d73679ba1e2b8835254774f7726e8d. https://bugzilla.gnome.org/show_bug.cgi?id=744453 --- src/compositor/meta-surface-actor-wayland.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compositor/meta-surface-actor-wayland.c b/src/compositor/meta-surface-actor-wayland.c index 865e04192..2786a5ab6 100644 --- a/src/compositor/meta-surface-actor-wayland.c +++ b/src/compositor/meta-surface-actor-wayland.c @@ -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)