summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2015-01-22 21:11:53 +0000
committerRichard Hughes <richard@hughsie.com>2015-01-22 21:11:53 +0000
commit775f59405fd9f5269ff7d4e3d0a78133f7af5de2 (patch)
tree5d12708f3c5ba9a239188141440eeae3b436e20a
parent410bfd156c8d08f1c8004ea7d3ca46d639943445 (diff)
downloadappstream-glib-775f59405fd9f5269ff7d4e3d0a78133f7af5de2.tar.gz
trivial: Fix potential builder crash when a package has no deps
-rw-r--r--libappstream-builder/asb-task.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libappstream-builder/asb-task.c b/libappstream-builder/asb-task.c
index 10bf00f..42fb671 100644
--- a/libappstream-builder/asb-task.c
+++ b/libappstream-builder/asb-task.c
@@ -155,7 +155,7 @@ asb_task_explode_extra_packages (AsbTask *task, GError **error)
array = g_ptr_array_new_with_free_func (g_free);
icon_themes = g_ptr_array_new_with_free_func (g_free);
deps = asb_package_get_deps (priv->pkg);
- for (i = 0; deps[i] != NULL; i++) {
+ for (i = 0; deps != NULL && deps[i] != NULL; i++) {
if (g_strstr_len (deps[i], -1, " ") != NULL)
continue;
if (g_strstr_len (deps[i], -1, ".so") != NULL)