diff --git a/src/wofi.c b/src/wofi.c index a510008..fbf0493 100644 --- a/src/wofi.c +++ b/src/wofi.c @@ -1256,8 +1256,10 @@ static gboolean focus_entry(GtkWidget* widget, GdkEvent* event, gpointer data) { if(widget == entry && dbus != NULL) { GError* err = NULL; g_dbus_proxy_call_sync(dbus, "SetVisible", g_variant_new("(b)", event->focus_change.in), G_DBUS_CALL_FLAGS_NONE, 2000, NULL, &err); - if(err != NULL && err->code != G_DBUS_ERROR_SERVICE_UNKNOWN) { - fprintf(stderr, "Error while changing OSK state %s\n", err->message); + if(err != NULL) { + if(err->code != G_DBUS_ERROR_SERVICE_UNKNOWN) { + fprintf(stderr, "Error while changing OSK state %s\n", err->message); + } g_error_free(err); } }