diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-07-11 00:12:43 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-07-11 00:12:43 +0300 |
commit | 368afa4bc05e5b66e521b6c881cd8e8f260cf5df (patch) | |
tree | ec9bd6a3c992c46550ad9aa396f10862257db68d /src/test/testlauncher.cpp | |
parent | ee75580d40c5c444d184a6ecbeb99493ba42085a (diff) | |
download | plus-368afa4bc05e5b66e521b6c881cd8e8f260cf5df.tar.gz plus-368afa4bc05e5b66e521b6c881cd8e8f260cf5df.tar.bz2 plus-368afa4bc05e5b66e521b6c881cd8e8f260cf5df.tar.xz plus-368afa4bc05e5b66e521b6c881cd8e8f260cf5df.zip |
Add missing checks into other files.
Diffstat (limited to 'src/test/testlauncher.cpp')
-rw-r--r-- | src/test/testlauncher.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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<uint32_t*>(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)); |