Commit ff29eab7 authored by Georges Basile Stavracas Neto's avatar Georges Basile Stavracas Neto
Browse files

flatpak: only access length field of existing array

It causes a segmentation fault when it fails to detect
the runtimes.
parent 9efa88a6
...@@ -109,6 +109,9 @@ add_runtimes (GbpFlatpakPreferencesAddin *self, ...@@ -109,6 +109,9 @@ add_runtimes (GbpFlatpakPreferencesAddin *self,
NULL, NULL,
NULL); NULL);
if (refs == NULL)
return;
for (guint j = 0; j < refs->len; j++) for (guint j = 0; j < refs->len; j++)
{ {
FlatpakRemoteRef *ref = g_ptr_array_index (refs, j); FlatpakRemoteRef *ref = g_ptr_array_index (refs, j);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment