Deleting TaxTable entries can crash application

Change the switch statement to include GNC_AMT_TYPE_VALUE to return a
value for row_text[1] and change default to set it to NULL
This commit is contained in:
Robert Fewell 2019-05-15 17:55:09 +01:00
parent fade13f813
commit 5ad3cd0d60

View File

@ -377,12 +377,15 @@ tax_table_entries_refresh (TaxTableWindow *ttw)
xaccPrintAmount (amount,
gnc_default_print_info (FALSE)));
break;
default:
case GNC_AMT_TYPE_VALUE:
row_text[1] =
g_strdup_printf ("%s",
xaccPrintAmount (amount,
gnc_default_print_info (TRUE)));
break;
default:
row_text[1] = NULL;
break;
}
gtk_list_store_prepend(store, &iter);