소스 검색

Fix crash on transparency test on null surface

Ivan Savenko 1 년 전
부모
커밋
dd045e2dc7
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      client/renderSDL/SDLImage.cpp

+ 4 - 1
client/renderSDL/SDLImage.cpp

@@ -235,7 +235,10 @@ void SDLImage::setFlagColor(PlayerColor player)
 
 bool SDLImage::isTransparent(const Point & coords) const
 {
-	return CSDL_Ext::isTransparent(surf, coords.x, coords.y);
+	if (surf)
+		return CSDL_Ext::isTransparent(surf, coords.x, coords.y);
+	else
+		return true;
 }
 
 Point SDLImage::dimensions() const