[gnome-software] moduleset plugin: Bail out if any of the categories are missing
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] moduleset plugin: Bail out if any of the categories are missing
- Date: Thu, 2 Apr 2015 11:15:54 +0000 (UTC)
commit ecd9d1bdd1ba2d7bb9955710592c8a82bc9ee3c9
Author: Kalev Lember <kalevlember gmail com>
Date: Thu Apr 2 11:14:09 2015 +0200
moduleset plugin: Bail out if any of the categories are missing
Otherwise we just crash down below dereferencing a NULL pointer.
src/plugins/gs-plugin-moduleset.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/plugins/gs-plugin-moduleset.c b/src/plugins/gs-plugin-moduleset.c
index ba2a8c5..e995d6e 100644
--- a/src/plugins/gs-plugin-moduleset.c
+++ b/src/plugins/gs-plugin-moduleset.c
@@ -262,9 +262,9 @@ gs_plugin_refine (GsPlugin *plugin,
popular_apps = gs_moduleset_get_popular_apps (plugin->priv->moduleset);
system_apps = gs_moduleset_get_system_apps (plugin->priv->moduleset);
core_pkgs = gs_moduleset_get_core_packages (plugin->priv->moduleset);
- if (featured_apps == NULL &&
- popular_apps == NULL &&
- system_apps == NULL &&
+ if (featured_apps == NULL ||
+ popular_apps == NULL ||
+ system_apps == NULL ||
core_pkgs == NULL) {
g_set_error (error,
GS_PLUGIN_ERROR,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]