Revert "Bug 740471 - Applying payment to invoice Segmentation fault"

This reverts commit a6d7184d83.
The patch had no effect on the bug at all and needlessly clutters the code.
This commit is contained in:
Geert Janssens 2014-12-29 16:30:04 +01:00
parent d5ade4cbc0
commit ad09bcfd4a

View File

@ -1232,11 +1232,12 @@ void gncOwnerAutoApplyPaymentsWithLots (const GncOwner *owner, GList *lots)
* Note that due to the iterative nature of this function lots
* in the list may become empty/closed before they are evaluated as
* base lot, so we should check this for each lot. */
if (!left_lot || qof_instance_get_destroying (left_lot))
if (!left_lot)
continue;
if (gnc_lot_count_splits (left_lot) == 0)
{
gnc_lot_destroy (left_lot);
left_iter->data = NULL;
continue;
}
if (gnc_lot_is_closed (left_lot))
@ -1262,11 +1263,12 @@ void gncOwnerAutoApplyPaymentsWithLots (const GncOwner *owner, GList *lots)
* Note that due to the iterative nature of this function lots
* in the list may become empty/closed before they are evaluated as
* base lot, so we should check this for each lot. */
if (!right_lot || qof_instance_get_destroying (right_lot))
if (!right_lot)
continue;
if (gnc_lot_count_splits (right_lot) == 0)
{
gnc_lot_destroy (right_lot);
right_iter->data = NULL;
continue;
}
if (gnc_lot_is_closed (right_lot))