Fixed crash if dbus can't be initialized
(cherry picked from commitcf2c6fa58d) (cherry picked from commit57043825ba)
This commit is contained in:
1 parent
4fb81fdff9
commit
67100be3cf
1 file changed
+2
-1
@@ -283,7 +283,8 @@ static SDL_bool
|
|||||||
FcitxCreateInputContext(SDL_DBusContext* dbus, const char *appname, char **ic_path) {
|
FcitxCreateInputContext(SDL_DBusContext* dbus, const char *appname, char **ic_path) {
|
||||||
const char *program = "program";
|
const char *program = "program";
|
||||||
SDL_bool retval = SDL_FALSE;
|
SDL_bool retval = SDL_FALSE;
|
||||||
if (dbus->session_conn) {
|
|
||||||
|
if (dbus && dbus->session_conn) {
|
||||||
DBusMessage *msg = dbus->message_new_method_call(FCITX_DBUS_SERVICE, FCITX_IM_DBUS_PATH, FCITX_IM_DBUS_INTERFACE, "CreateInputContext");
|
DBusMessage *msg = dbus->message_new_method_call(FCITX_DBUS_SERVICE, FCITX_IM_DBUS_PATH, FCITX_IM_DBUS_INTERFACE, "CreateInputContext");
|
||||||
if (msg) {
|
if (msg) {
|
||||||
DBusMessage *reply = NULL;
|
DBusMessage *reply = NULL;
|
||||||
|
|||||||
Reference in new issue
Block a user