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