From d49a520d19f28c613c68b574686b182a9c0621be Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 24 Jun 2015 18:41:42 +0300 Subject: Add missing checks into resources directory. --- src/resources/dye.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/resources/dye.cpp') diff --git a/src/resources/dye.cpp b/src/resources/dye.cpp index 34a1937a5..c7287ee8a 100644 --- a/src/resources/dye.cpp +++ b/src/resources/dye.cpp @@ -150,6 +150,9 @@ int Dye::getType() const void Dye::normalDye(uint32_t *restrict pixels, const int bufSize) const { + if (!pixels) + return; + #ifdef ENABLE_CILKPLUS cilk_for (int ptr = 0; ptr < bufSize; ptr ++) { @@ -265,6 +268,9 @@ endlabel:{} void Dye::normalOGLDye(uint32_t *restrict pixels, const int bufSize) const { + if (!pixels) + return; + #ifdef ENABLE_CILKPLUS cilk_for (int ptr = 0; ptr < bufSize; ptr ++) { -- cgit v1.2.3-70-g09d2