[gnome-software/uajain/flatpak-null-fix: 5/5] flatpak: Fix logic error check of GsFlatpak in gs_plugin_download
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/uajain/flatpak-null-fix: 5/5] flatpak: Fix logic error check of GsFlatpak in gs_plugin_download
- Date: Mon, 23 Sep 2019 11:53:24 +0000 (UTC)
commit 3e1fe203b40248f571be2a804027acd8e23dc54e
Author: Umang Jain <umang endlessm com>
Date: Thu Sep 19 16:47:45 2019 +0530
flatpak: Fix logic error check of GsFlatpak in gs_plugin_download
GsFlatpak instance can be NULL if there are other apps for
download coming via other plugins. Since the last reference of
GsFlatpak was in the previous loop and the check is outside
the loop, this seems as a logical error. Instead, check if the
current plugin as no apps to download and if so, return early.
plugins/flatpak/gs-plugin-flatpak.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/plugins/flatpak/gs-plugin-flatpak.c b/plugins/flatpak/gs-plugin-flatpak.c
index 0944b4ef..007eab75 100644
--- a/plugins/flatpak/gs-plugin-flatpak.c
+++ b/plugins/flatpak/gs-plugin-flatpak.c
@@ -451,7 +451,7 @@ gs_plugin_download (GsPlugin *plugin, GsAppList *list,
if (flatpak != NULL)
gs_app_list_add (list_tmp, app);
}
- if (flatpak == NULL)
+ if (gs_app_list_length (list_tmp) == 0)
return TRUE;
if (!gs_plugin_has_flags (plugin, GS_PLUGIN_FLAGS_INTERACTIVE)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]