diff options
author | Richard Hughes <richard@hughsie.com> | 2014-08-11 22:47:11 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2014-08-11 22:47:51 +0100 |
commit | bae40691ee551e572cc73e6bd2bce438c429a623 (patch) | |
tree | 3c5b4f847b3c20e1b8a3f0beac7fcc4e50cab2c1 | |
parent | e022b63766010acfdf01fdafc084484f8e0596a0 (diff) | |
download | appstream-glib-bae40691ee551e572cc73e6bd2bce438c429a623.tar.gz |
trivial: Check for required values when running asb_context_setup()
-rw-r--r-- | libappstream-builder/asb-context.c | 16 |
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; |