simple-touch: Handle OOM when allocating struct touch

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

@ -281,6 +281,10 @@ touch_create(int width, int height)
struct touch *touch;
touch = malloc(sizeof *touch);
if (touch == NULL) {
fprintf(stderr, "out of memory\n");
exit(1);
}
touch->display = wl_display_connect(NULL);
assert(touch->display);

Loading…
Cancel
Save