pango_cairo_font_map_new() shouldn't call g_error
Calling pango_cairo_font_map_new()
with invalid PANGOCAIRO_BACKEND
env var results in a crash.
That shouldn't happen, according to
docs, it should return NULL
and not crash. I have a python binding and wanted to raise an error to the user if this happens. But when I tried it, I found that python simply crashed.
Reading the source I found that it calls g_error()
, which in turn calls, G_BREAKPOINT()
and crashed the application. I would suggest it called
g_warning()
instead of g_error()
, or anything better which doesn't crash.