소스 검색

NPE fix

Signed-off-by: Mario Danic <mario@lovelyhq.com>
Mario Danic 7 년 전
부모
커밋
ba7ee747d3
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/main/java/com/owncloud/android/utils/ReceiversHelper.java

+ 1 - 1
src/main/java/com/owncloud/android/utils/ReceiversHelper.java

@@ -63,7 +63,7 @@ public class ReceiversHelper {
         BroadcastReceiver broadcastReceiver = new BroadcastReceiver() {
             @Override
             public void onReceive(Context context, Intent intent) {
-                if (intent.getAction().equals(Intent.ACTION_POWER_CONNECTED)) {
+                if (intent.getAction() != null && intent.getAction().equals(Intent.ACTION_POWER_CONNECTED)) {
                     FilesSyncHelper.restartJobsIfNeeded();
                 }
             }