Widget can't be NULL.

This commit is contained in:
Michael Drake 2012-10-11 14:07:22 +01:00
parent c8263d299e
commit 5f7a3a7ada

View File

@ -19,6 +19,7 @@
*/ */
#include <sys/types.h> #include <sys/types.h>
#include <assert.h>
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
#include <stdbool.h> #include <stdbool.h>
@ -83,6 +84,8 @@ fbtk_request_redraw(fbtk_widget_t *widget)
fbtk_widget_t *cwidget; fbtk_widget_t *cwidget;
fbtk_widget_t *pwidget; fbtk_widget_t *pwidget;
assert(widget != NULL);
/* if widget not mapped do not try to redraw it */ /* if widget not mapped do not try to redraw it */
pwidget = widget; pwidget = widget;
while (pwidget != NULL) { while (pwidget != NULL) {