mirror of
https://git.planet-casio.com/Lephenixnoir/JustUI.git
synced 2025-06-07 13:55:04 +02:00
jlist: fix jlist_clear()
This commit is contained in:
parent
f5d6fb2e87
commit
a84b0adb3a
1 changed files with 3 additions and 1 deletions
|
@ -117,7 +117,9 @@ void jlist_update_model(jlist *l, int item_count)
|
||||||
if(l->item_count != item_count) {
|
if(l->item_count != item_count) {
|
||||||
l->items = realloc(l->items, item_count * sizeof *l->items);
|
l->items = realloc(l->items, item_count * sizeof *l->items);
|
||||||
if(!l->items) {
|
if(!l->items) {
|
||||||
item_count = 0;
|
l->item_count = 0;
|
||||||
|
l->cursor = -1;
|
||||||
|
l->widget.dirty = 1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue