summaryrefslogtreecommitdiff
path: root/src/resources/dye.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-24 18:41:42 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-25 22:08:24 +0300
commitd49a520d19f28c613c68b574686b182a9c0621be (patch)
tree5b6943125fd364eaaaaa295b45100cdfc473dd93 /src/resources/dye.cpp
parent14f55eb8c6e44763e70046b9661bd056280226a5 (diff)
downloadmv-d49a520d19f28c613c68b574686b182a9c0621be.tar.gz
mv-d49a520d19f28c613c68b574686b182a9c0621be.tar.bz2
mv-d49a520d19f28c613c68b574686b182a9c0621be.tar.xz
mv-d49a520d19f28c613c68b574686b182a9c0621be.zip
Add missing checks into resources directory.
Diffstat (limited to 'src/resources/dye.cpp')
-rw-r--r--src/resources/dye.cpp6
1 files changed, 6 insertions, 0 deletions
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 ++)
{