mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-04 03:35:19 +02:00
Fix crash if queue is empty during savestate.
On load it would then crash.
This commit is contained in:
@@ -579,18 +579,21 @@ struct ThreadQueueList
|
||||
Queue *cur = &queues[i];
|
||||
int size = cur->end - cur->first;
|
||||
p.Do(size);
|
||||
int capacity = cur->capacity;
|
||||
p.Do(capacity);
|
||||
|
||||
if (size == 0)
|
||||
if (capacity == 0)
|
||||
continue;
|
||||
|
||||
if (p.mode == p.MODE_READ)
|
||||
{
|
||||
link(i, size);
|
||||
link(i, capacity);
|
||||
cur->first = (cur->capacity - size) / 2;
|
||||
cur->end = cur->first + size;
|
||||
}
|
||||
|
||||
p.DoArray(&cur->data[cur->first], size);
|
||||
if (size != 0)
|
||||
p.DoArray(&cur->data[cur->first], size);
|
||||
}
|
||||
|
||||
p.DoMarker("ThreadQueueList");
|
||||
|
||||
Reference in New Issue
Block a user