From 293cd0dabd9db6a57167ea88cd42f5f507e23156 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Sat, 14 Nov 2015 16:47:38 +0100 Subject: [PATCH 2/7] Check the correct pointer for NULL --- src/basecode/toolkit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/basecode/toolkit.cpp b/src/basecode/toolkit.cpp index 26c79d0..aa25363 100644 --- a/src/basecode/toolkit.cpp +++ b/src/basecode/toolkit.cpp @@ -407,8 +407,8 @@ SDL_Cursor *load_cursor(const char *aFilename, int hotx, int hoty) SDL_Cursor *cursor; int ix, iy, n; unsigned char *imgdata = stbi_load(aFilename, &ix, &iy, &n, 4); - - if (data == NULL) + + if (imgdata == NULL) return NULL; if (ix > 32 || iy > 32) -- 2.5.0