]> git.sesse.net Git - vlc/commitdiff
Wayland/shell: fix NULL dereference in pathological case
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 16 Oct 2014 17:21:01 +0000 (20:21 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 16 Oct 2014 17:24:06 +0000 (20:24 +0300)
modules/video_output/wayland/shell_surface.c

index 29fa0ef7552a52ed0399334a926960d93f08d184..efa9a29c6005773223f8487af0d5552d4536f600 100644 (file)
@@ -300,7 +300,8 @@ static void Close(vout_window_t *wnd)
     wl_shell_surface_destroy(sys->shell_surface);
     wl_surface_destroy(wnd->handle.wl);
     wl_shell_destroy(sys->shell);
-    wl_output_destroy(sys->output);
+    if (sys->output != NULL)
+        wl_output_destroy(sys->output);
     wl_compositor_destroy(sys->compositor);
     wl_display_disconnect(wnd->display.wl);
     free(sys);