Explorar el Código

Fix crash on opening creature window with bonuses that don't have icon

Ivan Savenko hace 1 año
padre
commit
e862b9c868
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      client/renderSDL/SDLImage.cpp

+ 1 - 1
client/renderSDL/SDLImage.cpp

@@ -196,7 +196,7 @@ Point SDLImageConst::dimensions() const
 
 std::shared_ptr<IImage> SDLImageConst::createImageReference(EImageBlitMode mode)
 {
-	if (surf->format->palette)
+	if (surf && surf->format->palette)
 		return std::make_shared<SDLImageIndexed>(shared_from_this(), mode);
 	else
 		return std::make_shared<SDLImageRGB>(shared_from_this(), mode);