diff --git a/src/common/2d/v_2ddrawer.cpp b/src/common/2d/v_2ddrawer.cpp index 717d607c67..10f4869b92 100644 --- a/src/common/2d/v_2ddrawer.cpp +++ b/src/common/2d/v_2ddrawer.cpp @@ -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());