فهرست منبع

Fix DBus error message if IBus couldn't be initialized.

Alex Baines 10 سال پیش
والد
کامیت
a4458a7002
1فایلهای تغییر یافته به همراه4 افزوده شده و 2 حذف شده
  1. 4 2
      src/core/linux/SDL_ibus.c

+ 4 - 2
src/core/linux/SDL_ibus.c

@@ -479,8 +479,10 @@ SDL_IBus_Init(void)
         inotify_wd = inotify_add_watch(inotify_fd, addr_file, IN_CREATE | IN_MODIFY);
         SDL_free(addr_file);
         
-        result = IBus_SetupConnection(dbus, addr);
-        SDL_free(addr);
+        if (addr) {
+            result = IBus_SetupConnection(dbus, addr);
+            SDL_free(addr);
+        }
     }
     
     return result;