From 532e41e66247e3195dfb9ff52d0400df29abaeef Mon Sep 17 00:00:00 2001 From: Tool Man Date: Fri, 5 Jan 2024 14:53:47 +0000 Subject: [PATCH] Revert big brain gamer move What could possibly go wrong? Re-added the assert tags --- src/sprite_picture.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/sprite_picture.cpp b/src/sprite_picture.cpp index 59fb6259b08..76deccf4f9b 100644 --- a/src/sprite_picture.cpp +++ b/src/sprite_picture.cpp @@ -181,9 +181,7 @@ int Sprite_Picture::GetFrameWidth() const { const auto& data = pic.data; auto& bitmap = GetBitmap(); - if (!bitmap) { - return 0; - } + assert(bitmap); if (feature_spritesheet && pic.NumSpriteSheetFrames() > 1) { return bitmap->GetWidth() / data.spritesheet_cols; @@ -197,9 +195,7 @@ int Sprite_Picture::GetFrameHeight() const { const auto& data = pic.data; auto& bitmap = GetBitmap(); - if (!bitmap) { - return 0; - } + assert(bitmap); if (feature_spritesheet && pic.NumSpriteSheetFrames() > 1) { return bitmap->GetHeight() / data.spritesheet_rows;