aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-03-05 21:51:58 +0000
committerrowanbeentje <rowan@beent.je>2009-03-05 21:51:58 +0000
commit311a17193daa303d17fe182fdba8edaf7a620ab4 (patch)
treea835d3b746d9b949e2937c09a2bd402e3060b3e7 /Source
parent68dd0c0f1bd028725d697ed2fc1f2ce33bb9682f (diff)
downloadsequelpro-311a17193daa303d17fe182fdba8edaf7a620ab4.tar.gz
sequelpro-311a17193daa303d17fe182fdba8edaf7a620ab4.tar.bz2
sequelpro-311a17193daa303d17fe182fdba8edaf7a620ab4.zip
Fixes a division by zero error causing crashes on multi-table CSV and XML exports (Issue #184)
Diffstat (limited to 'Source')
-rw-r--r--Source/TableDump.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/TableDump.m b/Source/TableDump.m
index f7fd3a80..fb0504a8 100644
--- a/Source/TableDump.m
+++ b/Source/TableDump.m
@@ -1067,7 +1067,7 @@
for ( i = startingRow ; i < totalRows ; i++ ) {
// Update the progress bar
- [singleProgressBar setDoubleValue:((i+1)*100/totalRows)];
+ if (totalRows) [singleProgressBar setDoubleValue:((i+1)*100/totalRows)];
if ((int)[singleProgressBar doubleValue] > lastProgressValue) {
lastProgressValue = (int)[singleProgressBar doubleValue];
[singleProgressBar displayIfNeeded];
@@ -1421,7 +1421,7 @@
for ( i = 1 ; i < totalRows ; i++ ) {
// Update the progress bar
- [singleProgressBar setDoubleValue:((i+1)*100/totalRows)];
+ if (totalRows) [singleProgressBar setDoubleValue:((i+1)*100/totalRows)];
if ((int)[singleProgressBar doubleValue] > lastProgressValue) {
lastProgressValue = (int)[singleProgressBar doubleValue];
[singleProgressBar displayIfNeeded];