diff --git a/GPU/GLES/GLES_GPU.cpp b/GPU/GLES/GLES_GPU.cpp index 76dbfa3437..54ccde4f63 100644 --- a/GPU/GLES/GLES_GPU.cpp +++ b/GPU/GLES/GLES_GPU.cpp @@ -736,6 +736,11 @@ void GLES_GPU::ExecuteOp(u32 op, u32 diff) { // The arrow and other rotary items in Puzbob are bezier patches, strangely enough. case GE_CMD_BEZIER: { + if (!Memory::IsValidAddress(gstate_c.vertexAddr)) { + ERROR_LOG_REPORT(G3D, "Bad vertex address %08x!", gstate_c.vertexAddr); + break; + } + void *control_points = Memory::GetPointer(gstate_c.vertexAddr); void *indices = NULL; if ((gstate.vertType & GE_VTYPE_IDX_MASK) != GE_VTYPE_IDX_NONE) { @@ -771,6 +776,11 @@ void GLES_GPU::ExecuteOp(u32 op, u32 diff) { case GE_CMD_SPLINE: { + if (!Memory::IsValidAddress(gstate_c.vertexAddr)) { + ERROR_LOG_REPORT(G3D, "Bad vertex address %08x!", gstate_c.vertexAddr); + break; + } + void *control_points = Memory::GetPointer(gstate_c.vertexAddr); void *indices = NULL; if ((gstate.vertType & GE_VTYPE_IDX_MASK) != GE_VTYPE_IDX_NONE) {