summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Panel.c2
-rw-r--r--Vector.c3
2 files changed, 2 insertions, 3 deletions
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);
diff --git a/Vector.c b/Vector.c
index 77f56a88..63b64723 100644
--- a/Vector.c
+++ b/Vector.c
@@ -65,8 +65,9 @@ int Vector_count(const Vector* this) {
}
Object* Vector_get(Vector* this, int idx) {
- assert(idx < this->items);
+ assert(idx >= 0 && idx < this->items);
assert(Vector_isConsistent(this));
+ assert(this->array[idx]);
return this->array[idx];
}