From: John Darrington Date: Sat, 4 Jul 2020 09:15:04 +0000 (+0200) Subject: Mitigate bug #48050 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;h=cf039918a493868e3b777575b2bc504c3adbb9d5;p=pspp Mitigate bug #48050 This bug caused an assertion failure in src/data/datasheet.c The change here traps the faulty condition earlier and raises a G_CRITICAL rather than an assertion. --- diff --git a/src/ui/gui/psppire-data-store.c b/src/ui/gui/psppire-data-store.c index b1f23bad2a..012c010fe6 100644 --- a/src/ui/gui/psppire-data-store.c +++ b/src/ui/gui/psppire-data-store.c @@ -377,6 +377,8 @@ static void psppire_data_store_delete_value (PsppireDataStore *store, gint case_index) { g_return_if_fail (store->datasheet); + g_return_if_fail (case_index < datasheet_get_n_columns (store->datasheet)); + datasheet_delete_columns (store->datasheet, case_index, 1); datasheet_insert_column (store->datasheet, NULL, -1, case_index); }