mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-21 19:51:27 +00:00
- bail out if shape
is null in F2DDrawer::AddShape
This commit is contained in:
parent
41c69736b1
commit
0b3ee04025
1 changed files with 4 additions and 0 deletions
|
@ -592,6 +592,10 @@ void DShape2D::OnDestroy() {
|
|||
|
||||
void F2DDrawer::AddShape(FGameTexture* img, DShape2D* shape, DrawParms& parms)
|
||||
{
|
||||
// bail if shape is null (shouldn't happen but it might)
|
||||
if (!shape)
|
||||
ThrowAbortException(X_OTHER, "shape is null");
|
||||
|
||||
// [MK] bail out if vertex/coord array sizes are mismatched
|
||||
if ( shape->mVertices.Size() != shape->mCoords.Size() )
|
||||
ThrowAbortException(X_OTHER, "Mismatch in vertex/coord count: %u != %u", shape->mVertices.Size(), shape->mCoords.Size());
|
||||
|
|
Loading…
Reference in a new issue