appstream: Fix critical warning when appstream contains invalid bundle
When some appstream data contains a <bundle/>
element with no content,
the following critical warnings are printed:
gs_app_add_source: assertion 'source != NULL' failed
g_strsplit: assertion 'string != NULL' failed
g_strv_length: assertion 'str_array != NULL' failed
not handling error not-supported for action search: invalid ID (null) for a flatpak ref
That’s not very pretty, so avoid the warnings by not trying to add the source if the bundle is malformed.
Signed-off-by: Philip Withnall pwithnall@endlessos.org