diff options
author | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2016-03-16 15:05:03 +0200 |
---|---|---|
committer | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2016-03-24 13:48:21 +0200 |
commit | fd45f60f4e18454489566e1bf61cb1b27b67fd91 (patch) | |
tree | 604f26ed8e4349063f671411fdbb0dd55a176a98 | |
parent | cfb053f27fcf0b2c0eadf6751bea1b716f88107e (diff) |
ivi-shell: add sanity check in ivi_shell_surface_configure
This should not get called unless there is an ivi_shell_surface.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Eugen Friedrich <friedrix@gmail.com>
-rw-r--r-- | ivi-shell/ivi-shell.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ivi-shell/ivi-shell.c b/ivi-shell/ivi-shell.c index 9c11f6fc..d136f460 100644 --- a/ivi-shell/ivi-shell.c +++ b/ivi-shell/ivi-shell.c @@ -108,7 +108,11 @@ ivi_shell_surface_configure(struct weston_surface *surface, { struct ivi_shell_surface *ivisurf = get_ivi_shell_surface(surface); - if (surface->width == 0 || surface->height == 0 || ivisurf == NULL) + assert(ivisurf); + if (!ivisurf) + return; + + if (surface->width == 0 || surface->height == 0) return; if (ivisurf->width != surface->width || |