fp-print: Assert the prints aren't set when initialized

This commit is contained in:
Marco Trevisan (Treviño) 2019-11-27 19:25:34 +01:00
parent f6f689f9cd
commit 92db82e3d4

View file

@ -580,7 +580,10 @@ fpi_print_set_type (FpPrint *print,
print->type = type; print->type = type;
if (print->type == FP_PRINT_NBIS) 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]); g_object_notify_by_pspec (G_OBJECT (print), properties[PROP_FPI_TYPE]);
} }