Blob Blame History Raw
From 13dba87820f10d606e70541514195c3cd029c7c1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
Date: Wed, 27 Nov 2019 19:25:34 +0100
Subject: [PATCH 040/181] fp-print: Assert the prints aren't set when
 initialized

---
 libfprint/fp-print.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libfprint/fp-print.c b/libfprint/fp-print.c
index 776fc71..ff7927a 100644
--- a/libfprint/fp-print.c
+++ b/libfprint/fp-print.c
@@ -580,7 +580,10 @@ fpi_print_set_type (FpPrint    *print,
 
   print->type = type;
   if (print->type == FP_PRINT_NBIS)
-    print->prints = g_ptr_array_new_with_free_func (g_free);
+    {
+      g_assert_null (print->prints);
+      print->prints = g_ptr_array_new_with_free_func (g_free);
+    }
   g_object_notify_by_pspec (G_OBJECT (print), properties[PROP_FPI_TYPE]);
 }
 
-- 
2.24.1