mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-21 14:41:39 +00:00
GE Debugger: Fix crash on 0 count prim.
This commit is contained in:
parent
132686513d
commit
daaf448d22
@ -266,7 +266,7 @@ bool DrawEngineCommon::GetCurrentSimpleVertices(int count, std::vector<GPUDebugV
|
||||
u16 indexLowerBound = 0;
|
||||
u16 indexUpperBound = count - 1;
|
||||
|
||||
if (!Memory::IsValidAddress(gstate_c.vertexAddr))
|
||||
if (!Memory::IsValidAddress(gstate_c.vertexAddr) || count == 0)
|
||||
return false;
|
||||
|
||||
bool savedVertexFullAlpha = gstate_c.vertexFullAlpha;
|
||||
|
@ -813,6 +813,9 @@ bool TransformUnit::GetCurrentSimpleVertices(int count, std::vector<GPUDebugVert
|
||||
u16 indexLowerBound = 0;
|
||||
u16 indexUpperBound = count - 1;
|
||||
|
||||
if (!Memory::IsValidAddress(gstate_c.vertexAddr) || count == 0)
|
||||
return false;
|
||||
|
||||
if (count > 0 && (gstate.vertType & GE_VTYPE_IDX_MASK) != GE_VTYPE_IDX_NONE) {
|
||||
const u8 *inds = Memory::GetPointer(gstate_c.indexAddr);
|
||||
const u16_le *inds16 = (const u16_le *)inds;
|
||||
|
Loading…
x
Reference in New Issue
Block a user