aboutsummaryrefslogtreecommitdiff
path: root/src/qt/csvmodelwriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/csvmodelwriter.cpp')
-rw-r--r--src/qt/csvmodelwriter.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/qt/csvmodelwriter.cpp b/src/qt/csvmodelwriter.cpp
index 62c0b949aa..4b21b8c4be 100644
--- a/src/qt/csvmodelwriter.cpp
+++ b/src/qt/csvmodelwriter.cpp
@@ -48,7 +48,11 @@ bool CSVModelWriter::write()
return false;
QTextStream out(&file);
- int numRows = model->rowCount();
+ int numRows = 0;
+ if(model)
+ {
+ numRows = model->rowCount();
+ }
// Header row
for(int i=0; i<columns.size(); ++i)