diff options
Diffstat (limited to 'Panel.c')
-rw-r--r-- | Panel.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -18,7 +18,6 @@ in the source distribution for its full text. #include <ctype.h> #include <string.h> #include <assert.h> -#include <curses.h> //#link curses @@ -295,6 +294,7 @@ void Panel_draw(Panel* this, bool focus) { for(int i = first, j = 0; j < this->h && i < last; i++, j++) { Object* itemObj = Vector_get(this->items, i); + assert(itemObj); if(!itemObj) continue; RichString_begin(item); Object_display(itemObj, &item); int itemLen = RichString_sizeVal(item); @@ -319,6 +319,7 @@ void Panel_draw(Panel* this, bool focus) { } else { Object* oldObj = Vector_get(this->items, this->oldSelected); + assert(oldObj); RichString_begin(old); Object_display(oldObj, &old); int oldLen = RichString_sizeVal(old); |