OCI: Don't crash on mirroring an OCI repo without annotations

If we're using labels the annotations hashtable may be NULL, which
was causing a crash. Just do an early check.

Closes: #2978
Approved by: alexlarsson
This commit is contained in:
Alexander Larsson
2019-09-03 16:02:25 +02:00
committed by Atomic Bot
parent 51fe0307ef
commit 618c38245f

View File

@@ -744,6 +744,9 @@ flatpak_oci_export_annotations (GHashTable *source,
};
int i;
if (source == NULL)
return;
for (i = 0; i < G_N_ELEMENTS (keys); i++)
{
const char *key = keys[i];