The GError is now always freed if it's non-null

This commit is contained in:
Scoopta 2020-05-09 13:20:19 -07:00
parent cb02aeee63
commit 6db85c1dd2

View File

@ -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) {
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);
}
}