From 368afa4bc05e5b66e521b6c881cd8e8f260cf5df Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 11 Jul 2015 00:12:43 +0300 Subject: Add missing checks into other files. --- src/test/testlauncher.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/test') diff --git a/src/test/testlauncher.cpp b/src/test/testlauncher.cpp index 84890fe85..ca47f1b29 100644 --- a/src/test/testlauncher.cpp +++ b/src/test/testlauncher.cpp @@ -340,6 +340,8 @@ int TestLauncher::testTextures() SDL_Surface *const screen1 = mainGraphics->getScreenshot(); SDL_Surface *const screen2 = imageHelper->convertTo32Bit(screen1); SDL_FreeSurface(screen1); + if (!screen2) + break; pixels = static_cast(screen2->pixels); bool fail(false); for (int f = 0; f < 6; f ++) @@ -588,6 +590,8 @@ int TestLauncher::testDraw() vert->image = img[2]; Skin *skin = theme->load("button.xml", "button.xml"); + if (!skin) + return 0; mainGraphics->pushClipArea(Rect(10, 20, 790, 580)); mainGraphics->setColor(Color(0xFFU, 0xFFU, 0x00U, 0xFFU)); mainGraphics->drawRectangle(Rect(0, 0, 400, 200)); -- cgit v1.2.3-60-g2f50