[gnome-software] trivial: Add a sanity check when getting the installed apps
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Add a sanity check when getting the installed apps
- Date: Tue, 23 Aug 2016 13:56:27 +0000 (UTC)
commit e921b1efc1c26e80c97a4ce77726f013245b026b
Author: Richard Hughes <richard hughsie com>
Date: Tue Aug 23 14:52:15 2016 +0100
trivial: Add a sanity check when getting the installed apps
To get rid of the big red warnings just use the latest appstream-glib.
src/gs-plugin-loader.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index 7dded0c..f0b929e 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -737,6 +737,13 @@ gs_plugin_loader_app_is_valid_installed (GsApp *app, gpointer user_data)
return FALSE;
}
+ /* sanity check */
+ if (!gs_app_is_installed (app)) {
+ g_autofree gchar *tmp = gs_app_to_string (app);
+ g_warning ("ignoring non-installed app %s", tmp);
+ return FALSE;
+ }
+
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]