summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2018-05-21 15:16:16 +0100
committerRichard Hughes <richard@hughsie.com>2018-05-21 15:30:10 +0100
commitb1489e10d6cfa536150e06f49fb9c9fcac4a9d00 (patch)
treea805d3a85dfd00ec24dba5b9251ba4f49c25c870
parent2ac425ffc7beab03172f559004efb2aaafdd49cb (diff)
downloadappstream-glib-b1489e10d6cfa536150e06f49fb9c9fcac4a9d00.tar.gz
trivial: Don't crash when validating <image/>
-rw-r--r--libappstream-glib/as-app-validate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libappstream-glib/as-app-validate.c b/libappstream-glib/as-app-validate.c
index 2829585..f6fa323 100644
--- a/libappstream-glib/as-app-validate.c
+++ b/libappstream-glib/as-app-validate.c
@@ -604,7 +604,7 @@ as_app_validate_image (AsImage *im, AsAppValidateHelper *helper)
/* blank */
url = as_image_get_url (im);
- if ((guint) strlen (url) == 0) {
+ if (url == NULL || (guint) strlen (url) == 0) {
ai_app_validate_add (helper,
AS_PROBLEM_KIND_VALUE_MISSING,
"<screenshot> has no content");