Blame SOURCES/0040-fp-print-Assert-the-prints-aren-t-set-when-initializ.patch

73b847
From 13dba87820f10d606e70541514195c3cd029c7c1 Mon Sep 17 00:00:00 2001
73b847
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
73b847
Date: Wed, 27 Nov 2019 19:25:34 +0100
73b847
Subject: [PATCH 040/181] fp-print: Assert the prints aren't set when
73b847
 initialized
73b847
73b847
---
73b847
 libfprint/fp-print.c | 5 ++++-
73b847
 1 file changed, 4 insertions(+), 1 deletion(-)
73b847
73b847
diff --git a/libfprint/fp-print.c b/libfprint/fp-print.c
73b847
index 776fc71..ff7927a 100644
73b847
--- a/libfprint/fp-print.c
73b847
+++ b/libfprint/fp-print.c
73b847
@@ -580,7 +580,10 @@ fpi_print_set_type (FpPrint    *print,
73b847
 
73b847
   print->type = type;
73b847
   if (print->type == FP_PRINT_NBIS)
73b847
-    print->prints = g_ptr_array_new_with_free_func (g_free);
73b847
+    {
73b847
+      g_assert_null (print->prints);
73b847
+      print->prints = g_ptr_array_new_with_free_func (g_free);
73b847
+    }
73b847
   g_object_notify_by_pspec (G_OBJECT (print), properties[PROP_FPI_TYPE]);
73b847
 }
73b847
 
73b847
-- 
73b847
2.24.1
73b847