diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-11-02 14:25:05 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-11-02 14:25:05 +0300 |
commit | ad4421c3f53b7d4b69bd8560029782295f36c4af (patch) | |
tree | 27d70aca3517d472b25592972a9124411f0f615d /src | |
parent | ce08e67ca1d83e4413a0eec3fd034b2a59a4b376 (diff) | |
download | plus-ad4421c3f53b7d4b69bd8560029782295f36c4af.tar.gz plus-ad4421c3f53b7d4b69bd8560029782295f36c4af.tar.bz2 plus-ad4421c3f53b7d4b69bd8560029782295f36c4af.tar.xz plus-ad4421c3f53b7d4b69bd8560029782295f36c4af.zip |
add missing check.
Diffstat (limited to 'src')
-rw-r--r-- | src/input/inputmanager.cpp | 2 | ||||
-rw-r--r-- | src/utils/paths.cpp | 2 |
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); |