aboutsummaryrefslogtreecommitdiff
path: root/src/qt/csvmodelwriter.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2011-11-08 21:18:36 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2011-11-08 21:18:36 +0100
commitdead0ff8cd90eb39f1d9278539d2b3579982b3de (patch)
tree566823e2886404bf81b3ee94d99ba03497119590 /src/qt/csvmodelwriter.cpp
parent0fb0a38339e5cb404147c89f73ff10d962a47ca5 (diff)
Add robustness against null models
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)