File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -261,7 +261,6 @@ void Panel_draw(Panel* this, bool focus) {
261
261
int line = 0 ;
262
262
for (int i = first ; line < h && i < upTo ; i ++ ) {
263
263
Object * itemObj = Vector_get (this -> items , i );
264
- assert (itemObj ); if (!itemObj ) continue ;
265
264
RichString_begin (item );
266
265
Object_display (itemObj , & item );
267
266
int itemLen = RichString_sizeVal (item );
@@ -288,7 +287,6 @@ void Panel_draw(Panel* this, bool focus) {
288
287
289
288
} else {
290
289
Object * oldObj = Vector_get (this -> items , this -> oldSelected );
291
- assert (oldObj );
292
290
RichString_begin (old );
293
291
Object_display (oldObj , & old );
294
292
int oldLen = RichString_sizeVal (old );
Original file line number Diff line number Diff line change @@ -65,8 +65,9 @@ int Vector_count(const Vector* this) {
65
65
}
66
66
67
67
Object * Vector_get (Vector * this , int idx ) {
68
- assert (idx < this -> items );
68
+ assert (idx >= 0 && idx < this -> items );
69
69
assert (Vector_isConsistent (this ));
70
+ assert (this -> array [idx ]);
70
71
return this -> array [idx ];
71
72
}
72
73
You can’t perform that action at this time.
0 commit comments