Sfoglia il codice sorgente

ibus: make sure we don't pass a NULL path string over D-Bus.

Fixes #2941.
Ryan C. Gordon 4 anni fa
parent
commit
4914199665
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      src/core/linux/SDL_ibus.c

+ 1 - 1
src/core/linux/SDL_ibus.c

@@ -484,7 +484,7 @@ IBus_SimpleMessage(const char *method)
 {   
     SDL_DBusContext *dbus = SDL_DBus_GetContext();
     
-    if (IBus_CheckConnection(dbus)) {
+    if ((input_ctx_path != NULL) && (IBus_CheckConnection(dbus))) {
         SDL_DBus_CallVoidMethodOnConnection(ibus_conn, IBUS_SERVICE, input_ctx_path, IBUS_INPUT_INTERFACE, method, DBUS_TYPE_INVALID);
     }
 }