Skip to content

Commit

Permalink
Fix #7982
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Oct 18, 2024
1 parent 3a939b6 commit 61545a8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion glfw/ibus_glfw.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,12 @@ get_ibus_address_file_name(void) {
}
offset = snprintf(ans, sizeof(ans), "%s/.config", conf_env);
}
char *key = dbus_get_local_machine_id();
DBusError err;
char *key = dbus_try_get_local_machine_id(&err);
if (!key) {
_glfwInputError(GLFW_PLATFORM_ERROR, "Cannot connect to IBUS as could not get DBUS local machine id with error %s: %s", err.name ? err.name : "", err.message ? err.message : "");
return NULL;
}
snprintf(ans + offset, sizeof(ans) - offset, "/ibus/bus/%s-%s-%s", key, host, disp_num);
dbus_free(key);
return ans;
Expand Down

0 comments on commit 61545a8

Please sign in to comment.