summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-11-02 14:25:05 +0300
committerAndrei Karas <akaras@inbox.ru>2013-11-02 14:25:05 +0300
commitad4421c3f53b7d4b69bd8560029782295f36c4af (patch)
tree27d70aca3517d472b25592972a9124411f0f615d /src
parentce08e67ca1d83e4413a0eec3fd034b2a59a4b376 (diff)
downloadmanaplus-ad4421c3f53b7d4b69bd8560029782295f36c4af.tar.gz
manaplus-ad4421c3f53b7d4b69bd8560029782295f36c4af.tar.bz2
manaplus-ad4421c3f53b7d4b69bd8560029782295f36c4af.tar.xz
manaplus-ad4421c3f53b7d4b69bd8560029782295f36c4af.zip
add missing check.
Diffstat (limited to 'src')
-rw-r--r--src/input/inputmanager.cpp2
-rw-r--r--src/utils/paths.cpp2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/input/inputmanager.cpp b/src/input/inputmanager.cpp
index 7e7da4433..c84044771 100644
--- a/src/input/inputmanager.cpp
+++ b/src/input/inputmanager.cpp
@@ -29,7 +29,9 @@
#include "input/joystick.h"
#include "input/keyboardconfig.h"
#include "input/keyboarddata.h"
+#ifdef USE_SDL2
#include "input/multitouchmanager.h"
+#endif
#include "gui/gui.h"
#include "gui/sdlinput.h"
diff --git a/src/utils/paths.cpp b/src/utils/paths.cpp
index cba263027..e1a4ee03c 100644
--- a/src/utils/paths.cpp
+++ b/src/utils/paths.cpp
@@ -61,6 +61,8 @@ std::string getRealPath(const std::string &str)
{
#if defined(__OpenBSD__) || defined(__ANDROID__) || defined(__native_client__)
char *realPath = reinterpret_cast<char*>(calloc(PATH_MAX, sizeof(char)));
+ if (!realPath)
+ return "";
realpath(str.c_str(), realPath);
#else
char *realPath = realpath(str.c_str(), nullptr);