pixman-renderer: Don't unreference NULL hw_buffer image

If the buffer for an output was never set, or was reset to NULL at some
point, destroying the renderer output private would cause a crash.
dev
Ander Conselvan de Oliveira 12 years ago committed by Kristian Høgsberg
parent 5fb44141bf
commit 23e72b867a
  1. 1
      src/compositor.c
  2. 2
      src/pixman-renderer.c

@ -3207,6 +3207,7 @@ usage(int error_code)
" --connector=ID\tBring up only this connector\n"
" --seat=SEAT\t\tThe seat that weston should run on\n"
" --tty=TTY\t\tThe tty to use\n"
" --use-pixman\t\tUse the pixman (CPU) renderer\n"
" --current-mode\tPrefer current KMS mode over EDID preferred mode\n\n");
fprintf(stderr,

@ -507,6 +507,8 @@ pixman_renderer_output_destroy(struct weston_output *output)
struct pixman_output_state *po = get_output_state(output);
pixman_image_unref(po->shadow_image);
if (po->hw_buffer)
pixman_image_unref(po->hw_buffer);
po->shadow_image = NULL;

Loading…
Cancel
Save