diff options
-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); |