This adds a new NULL check to fail earlier when frame_create fails. This can
happen because PNG files couldn't be loaded from the data directory.
Signed-off-by: Simon Ser <contact@emersion.fr>
frame = xzalloc(sizeof *frame);
frame->frame = frame_create(window->display->theme, 0, 0,
buttons, window->title, NULL);
+ if (!frame->frame) {
+ free(frame);
+ return NULL;
+ }
frame->widget = window_add_widget(window, frame);
frame->child = widget_add_widget(frame->widget, data);