From 92db82e3d44049f33850342569e69d0a75afe5b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 27 Nov 2019 19:25:34 +0100 Subject: [PATCH] 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]); }