diff --git a/src/import_export/univcsvdialog.cpp b/src/import_export/univcsvdialog.cpp index 76b2ab4f10..769fc89132 100644 --- a/src/import_export/univcsvdialog.cpp +++ b/src/import_export/univcsvdialog.cpp @@ -1400,9 +1400,9 @@ void mmUnivCSVDialog::OnImport(wxCommandEvent& WXUNUSED(event)) } wxString trxDate = holder.Date.FormatISODate(); - account = Model_Account::instance().get(accountID_); + Model_Account::Data* account2 = Model_Account::instance().get(accountID_); const Model_Account::Data* toAccount = Model_Account::instance().get(holder.ToAccountID); - if ((trxDate < account->INITIALDATE) || + if ((trxDate < account2->INITIALDATE) || (toAccount && (trxDate < toAccount->INITIALDATE))) { wxString msg = wxString::Format(_("Line %ld: %s"), nLines + 1,