Skip to content

Commit 67100be

Browse files
committed
Fixed crash if dbus can't be initialized
(cherry picked from commit cf2c6fa) (cherry picked from commit 5704382)
1 parent 4fb81fd commit 67100be

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/core/linux/SDL_fcitx.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,8 @@ static SDL_bool
283283
FcitxCreateInputContext(SDL_DBusContext* dbus, const char *appname, char **ic_path) {
284284
const char *program = "program";
285285
SDL_bool retval = SDL_FALSE;
286-
if (dbus->session_conn) {
286+
287+
if (dbus && dbus->session_conn) {
287288
DBusMessage *msg = dbus->message_new_method_call(FCITX_DBUS_SERVICE, FCITX_IM_DBUS_PATH, FCITX_IM_DBUS_INTERFACE, "CreateInputContext");
288289
if (msg) {
289290
DBusMessage *reply = NULL;

0 commit comments

Comments
 (0)