mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 22:41:43 +00:00
inspector: Check a return value
We don't care about the error here, but we were relying on g_resources_get_info to zero the size even in case of error. No need to do that, we can just check the return value. Plus, it makes coverity happy.
This commit is contained in:
parent
f960d4f486
commit
1b8d06da2d
@ -120,9 +120,11 @@ load_resources_recurse (GtkInspectorResourceList *sl,
|
||||
else
|
||||
{
|
||||
count = 0;
|
||||
g_resources_get_info (p, 0, &size, NULL, NULL);
|
||||
*count_out += 1;
|
||||
*size_out += size;
|
||||
if (g_resources_get_info (p, 0, &size, NULL, NULL))
|
||||
{
|
||||
*count_out += 1;
|
||||
*size_out += size;
|
||||
}
|
||||
}
|
||||
|
||||
stored_size = size;
|
||||
|
Loading…
Reference in New Issue
Block a user