summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Rudd <urkle@outoforder.cc>2015-04-01 16:11:37 -0400
committerEdward Rudd <urkle@outoforder.cc>2015-04-01 16:11:37 -0400
commit2abe010239961a34bbc2ec3631258892c9a06d3a (patch)
tree4d2d3c345c90374786546d23d0b2b73a34139eec
parenta44cbcfd066ebe1a306b01f4d951ff5adac771ca (diff)
downloadsdl-2abe010239961a34bbc2ec3631258892c9a06d3a.tar.gz
handle the case where the ibus address can't be found. (prevents nasty crash)
-rw-r--r--src/core/linux/SDL_ibus.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/linux/SDL_ibus.c b/src/core/linux/SDL_ibus.c
index 1a0729f26..6b84be2e9 100644
--- a/src/core/linux/SDL_ibus.c
+++ b/src/core/linux/SDL_ibus.c
@@ -462,6 +462,9 @@ SDL_IBus_Init(void)
ibus_addr_file = SDL_strdup(addr_file);
addr = IBus_ReadAddressFromFile(addr_file);
+ if (!addr) {
+ return SDL_FALSE;
+ }
if (inotify_fd < 0) {
inotify_fd = inotify_init();