Эх сурвалжийг харах

fix dodgy code

Signed-off-by: Jonas Mayer <jonas.a.mayer@gmx.net>
Jonas Mayer 1 жил өмнө
parent
commit
322565f099

+ 2 - 2
app/src/main/java/com/owncloud/android/files/services/FileUploader.java

@@ -1447,10 +1447,10 @@ public class FileUploader extends Service
             mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
         }
 
-        if (uploadFileOperation == null) return;
+        if (uploadFileOperation == null || uploadFileOperation.getOldFile() == null) return;
         //cancel for old file because of file conflicts
         mNotificationManager.cancel(NotificationUtils.createUploadNotificationTag(uploadFileOperation.getOldFile()),
-                                   NOTIFICATION_ERROR_ID);
+                                    NOTIFICATION_ERROR_ID);
         mNotificationManager.cancel(NotificationUtils.createUploadNotificationTag(uploadFileOperation.getFile()),
                                    NOTIFICATION_ERROR_ID);
     }