clipboard: initialise clipboard memory after creation

In case we don't, weston segfault in clipboard_set_selection
on:
if (clipboard->source)
		clipboard_source_unref(clipboard->source);
Rafal Mielniczuk 13 years ago committed by Kristian Høgsberg
parent 8268d41410
commit 340a4343d0
  1. 1
      src/clipboard.c

@ -251,6 +251,7 @@ clipboard_create(struct weston_seat *seat)
clipboard = malloc(sizeof *clipboard);
if (clipboard == NULL)
return NULL;
memset(clipboard, 0, sizeof *clipboard);
clipboard->seat = seat;
clipboard->selection_listener.notify = clipboard_set_selection;

Loading…
Cancel
Save