Browse files

Don't crash if the mobileorg.org file doesn't exist

  • Loading branch information...
1 parent 013710c commit c538794ecaca88cfd1798015b2a2042002ef1e7f @matburt committed Apr 9, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/com/matburt/mobileorg/Synchronizers/WebDAVSynchronizer.java
View
6 src/com/matburt/mobileorg/Synchronizers/WebDAVSynchronizer.java
@@ -49,8 +49,12 @@ public void push() throws NotFoundException, ReportableError {
BufferedReader reader = this.getReadHandle("mobileorg.org");
String fileContents = "";
this.pushedStageFile = false;
-
String thisLine = "";
+
+ if (reader == null) {
+ return;
+ }
+
try {
while ((thisLine = reader.readLine()) != null) {
fileContents += thisLine + "\n";

0 comments on commit c538794

Please sign in to comment.