mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-06-03 19:30:07 +02:00
gresource: Use GError in more places
The API gives us an error message, lets use it.
This commit is contained in:
parent
dfaaf37338
commit
5c951e5b04
@ -113,8 +113,9 @@ extract_resource (GResource *resource,
|
|||||||
const gchar *path)
|
const gchar *path)
|
||||||
{
|
{
|
||||||
GBytes *bytes;
|
GBytes *bytes;
|
||||||
|
GError *error = NULL;
|
||||||
|
|
||||||
bytes = g_resource_lookup_data (resource, path, 0, NULL);
|
bytes = g_resource_lookup_data (resource, path, 0, &error);
|
||||||
if (bytes != NULL)
|
if (bytes != NULL)
|
||||||
{
|
{
|
||||||
gconstpointer data;
|
gconstpointer data;
|
||||||
@ -128,7 +129,8 @@ extract_resource (GResource *resource,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_printerr ("Can't find resource path %s\n", path);
|
g_printerr ("%s\n", error->message);
|
||||||
|
g_error_free (error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user