handle the case where the ibus address can't be found. (prevents nasty crash)
authorEdward Rudd <urkle@outoforder.cc>
Wed, 01 Apr 2015 16:11:37 -0400
changeset 945128c55cb65416
parent 9450 bcb16ffce95b
child 9452 d16ad6375b01
handle the case where the ibus address can't be found. (prevents nasty crash)
src/core/linux/SDL_ibus.c
     1.1 --- a/src/core/linux/SDL_ibus.c	Wed Apr 01 14:45:09 2015 -0400
     1.2 +++ b/src/core/linux/SDL_ibus.c	Wed Apr 01 16:11:37 2015 -0400
     1.3 @@ -462,6 +462,9 @@
     1.4          ibus_addr_file = SDL_strdup(addr_file);
     1.5          
     1.6          addr = IBus_ReadAddressFromFile(addr_file);
     1.7 +        if (!addr) {
     1.8 +            return SDL_FALSE;
     1.9 +        }
    1.10          
    1.11          if (inotify_fd < 0) {
    1.12              inotify_fd = inotify_init();