mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-17 16:30:30 +02:00
Fix crash if queue is empty during savestate.
On load it would then crash.
This commit is contained in:
1 parent
da2d5f0692
commit
68f5596dee
1 file changed
+6
-3
@@ -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