summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2014-08-11 22:47:11 +0100
committerRichard Hughes <richard@hughsie.com>2014-08-11 22:47:51 +0100
commitbae40691ee551e572cc73e6bd2bce438c429a623 (patch)
tree3c5b4f847b3c20e1b8a3f0beac7fcc4e50cab2c1
parente022b63766010acfdf01fdafc084484f8e0596a0 (diff)
downloadappstream-glib-bae40691ee551e572cc73e6bd2bce438c429a623.tar.gz
trivial: Check for required values when running asb_context_setup()
-rw-r--r--libappstream-builder/asb-context.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/libappstream-builder/asb-context.c b/libappstream-builder/asb-context.c
index 92f1226..9fbdad3 100644
--- a/libappstream-builder/asb-context.c
+++ b/libappstream-builder/asb-context.c
@@ -554,6 +554,22 @@ asb_context_setup (AsbContext *ctx, GError **error)
AsbContextPrivate *priv = GET_PRIVATE (ctx);
GList *l;
+ /* required stuff set */
+ if (priv->basename == NULL) {
+ g_set_error_literal (error,
+ ASB_PLUGIN_ERROR,
+ ASB_PLUGIN_ERROR_FAILED,
+ "basename not set!");
+ return FALSE;
+ }
+ if (priv->output_dir == NULL) {
+ g_set_error_literal (error,
+ ASB_PLUGIN_ERROR,
+ ASB_PLUGIN_ERROR_FAILED,
+ "output_dir not set!");
+ return FALSE;
+ }
+
/* load plugins */
if (!asb_plugin_loader_setup (priv->plugin_loader, error))
return FALSE;