From 0806a7958b5b5ee29da043d3e4f3f854c164059d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Sat, 31 Oct 2020 20:57:22 +0100 Subject: Assert Vector_get returns an object It is generally assumed Vector_get returns a non-NULL object. Use a generic assert in Vector_get instead of in callers. --- Panel.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'Panel.c') diff --git a/Panel.c b/Panel.c index 02440d85..ab3f6009 100644 --- a/Panel.c +++ b/Panel.c @@ -261,7 +261,6 @@ void Panel_draw(Panel* this, bool focus) { int line = 0; for(int i = first; line < h && i < upTo; i++) { Object* itemObj = Vector_get(this->items, i); - assert(itemObj); if(!itemObj) continue; RichString_begin(item); Object_display(itemObj, &item); int itemLen = RichString_sizeVal(item); @@ -288,7 +287,6 @@ 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); -- cgit v1.2.3