Compare commits

...

1 Commits

Author SHA1 Message Date
Nelson Benítez León
79c2fab4e6 Fix segmentation fault when running GTK4
Trying to run any GTK4 app with current GTK main branch results
in a segmentation fault in my system. Caused by code assuming
a GError must be present, but it is not because the functions
supposed to return a GError hit first a g_return_val_if_fail()
which makes them return FALSE without filling the GError out
parameter.

When the fix in here I can run GTK4 apps again, with some
g_critical() messages printed to the console because of
the g_return_val_if_fail() hit, but that seems to not affect
the execution, they are related to some renderers not being
found.
2023-09-30 21:42:07 +01:00

View File

@@ -655,7 +655,7 @@ gsk_renderer_new_for_surface (GdkSurface *surface)
g_message ("Failed to realize renderer of type '%s' for surface '%s': %s\n",
G_OBJECT_TYPE_NAME (renderer),
G_OBJECT_TYPE_NAME (surface),
error->message);
error ? error->message : "");
g_object_unref (renderer);
g_clear_error (&error);
}