From 608810a3e77b9cdc6513e1f09388fd75f655dbee Mon Sep 17 00:00:00 2001 From: Celil Date: Thu, 14 Jul 2011 17:11:11 -0700 Subject: [PATCH] Fix error when export is cancelled without specifying a filename. --- src/qt/addressbookpage.cpp | 2 ++ src/qt/transactionview.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/qt/addressbookpage.cpp b/src/qt/addressbookpage.cpp index 4f629fc262..063e510c30 100644 --- a/src/qt/addressbookpage.cpp +++ b/src/qt/addressbookpage.cpp @@ -187,6 +187,8 @@ void AddressBookPage::exportClicked() QDir::currentPath(), tr("Comma separated file (*.csv)")); + if (filename.isNull()) return; + CSVModelWriter writer(filename); // name, column, role diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp index 03df422605..8aa43395e7 100644 --- a/src/qt/transactionview.cpp +++ b/src/qt/transactionview.cpp @@ -242,6 +242,8 @@ void TransactionView::exportClicked() QDir::currentPath(), tr("Comma separated file (*.csv)")); + if (filename.isNull()) return; + CSVModelWriter writer(filename); // name, column, role