From e96c998be9e867e328d393966a60599dc3c37e3a Mon Sep 17 00:00:00 2001 From: Adam NAILI Date: Tue, 12 Dec 2017 13:18:22 +0100 Subject: Adding asserts, fixing the call of group_init that changed --- src/gui/window.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/gui/window.c') diff --git a/src/gui/window.c b/src/gui/window.c index 81af66a..7b5a75f 100644 --- a/src/gui/window.c +++ b/src/gui/window.c @@ -1,5 +1,7 @@ #include #include +#include +#include #include "gui/window.h" #include "common/mem.h" #include "string.h" @@ -7,6 +9,7 @@ #include "MLV/MLV_window.h" void window_init(Window *window, int width, int height, char *title) { + assert(window != NULL); assert(width > 0); assert(height > 0); window->width = width; @@ -15,9 +18,9 @@ void window_init(Window *window, int width, int height, char *title) { window->title = malloc_or_die(sizeof(char) * (strlen(title) + 1)); strcpy(window->title, title); window->group_buttons = malloc_or_die(sizeof(Group)); - group_init(window->group_buttons, 5); + group_init(window->group_buttons,window->width,100,0,window->height-100,5); window->group_pictureframe = malloc_or_die(sizeof(Group)); - group_init(window->group_pictureframe, 5); + group_init(window->group_pictureframe,window->width,window->height-100,0,0,5); } void window_free(Window *window) { -- cgit v1.2.3