Bug #702899: Fix crash in scrubbing code

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23074 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2013-06-30 20:38:14 +00:00
parent ca7bb16d69
commit e7537f85e9

View File

@ -1042,7 +1042,7 @@ xaccTransFindCommonCurrency (Transaction *trans, QofBook *book)
}
found = g_slist_sort( comlist, commodity_compare);
if ( ((CommodityCount*)(found->data))->commodity != NULL)
if ( found && found->data && (((CommodityCount*)(found->data))->commodity != NULL))
{
return ((CommodityCount*)(found->data))->commodity;
}