From c7ec9c1d851e424d6223175df9f5870c0a39aab7 Mon Sep 17 00:00:00 2001 From: Edward Rudd Date: Wed, 1 Apr 2015 16:11:37 -0400 Subject: [PATCH] handle the case where the ibus address can't be found. (prevents nasty crash) --- src/core/linux/SDL_ibus.c | 3 +++ 1 file changed, 3 insertions(+) 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();