simple-shm: Handle OOM when allocating struct display

dev
Kristian Høgsberg 11 years ago
parent 20ffdffc03
commit 96c619af43
  1. 4
      clients/simple-shm.c

@ -335,6 +335,10 @@ create_display(void)
struct display *display;
display = malloc(sizeof *display);
if (display == NULL) {
fprintf(stderr, "out of memory\n");
exit(1);
}
display->display = wl_display_connect(NULL);
assert(display->display);

Loading…
Cancel
Save