[gnome-builder] flatpak: add some assertions



commit 3473452c1e97b3cc0b8d49162a626363e717c6e3
Author: Christian Hergert <chergert redhat com>
Date:   Fri Jun 9 19:51:15 2017 -0700

    flatpak: add some assertions

 plugins/flatpak/gbp-flatpak-application-addin.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/plugins/flatpak/gbp-flatpak-application-addin.c b/plugins/flatpak/gbp-flatpak-application-addin.c
index 51eeef4..5d6375d 100644
--- a/plugins/flatpak/gbp-flatpak-application-addin.c
+++ b/plugins/flatpak/gbp-flatpak-application-addin.c
@@ -390,6 +390,10 @@ gbp_flatpak_application_addin_get_installations (GbpFlatpakApplicationAddin *sel
   for (guint i = 0; i < self->installations->len; i++)
     {
       InstallInfo *info = g_ptr_array_index (self->installations, i);
+
+      g_assert (info != NULL);
+      g_assert (FLATPAK_IS_INSTALLATION (info->installation));
+
       g_ptr_array_add (ret, g_object_ref (info->installation));
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]