Fix DBus error message if IBus couldn't be initialized.
authorAlex Baines <alex@abaines.me.uk>
Fri, 20 Mar 2015 19:47:03 +0000
changeset 94620288195afd8c
parent 9461 409b20ba3e70
child 9463 d5925549bfe0
Fix DBus error message if IBus couldn't be initialized.
src/core/linux/SDL_ibus.c
     1.1 --- a/src/core/linux/SDL_ibus.c	Mon Apr 06 18:26:13 2015 -0400
     1.2 +++ b/src/core/linux/SDL_ibus.c	Fri Mar 20 19:47:03 2015 +0000
     1.3 @@ -479,8 +479,10 @@
     1.4          inotify_wd = inotify_add_watch(inotify_fd, addr_file, IN_CREATE | IN_MODIFY);
     1.5          SDL_free(addr_file);
     1.6          
     1.7 -        result = IBus_SetupConnection(dbus, addr);
     1.8 -        SDL_free(addr);
     1.9 +        if (addr) {
    1.10 +            result = IBus_SetupConnection(dbus, addr);
    1.11 +            SDL_free(addr);
    1.12 +        }
    1.13      }
    1.14      
    1.15      return result;