소스 검색

Merge pull request #3226 from nextcloud/NPEonTrashbin

UI can already be non-existent
Tobias Kaminsky 6 년 전
부모
커밋
b997966e90
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      src/main/java/com/owncloud/android/ui/trashbin/TrashbinActivity.java

+ 4 - 2
src/main/java/com/owncloud/android/ui/trashbin/TrashbinActivity.java

@@ -275,9 +275,11 @@ public class TrashbinActivity extends FileActivity implements TrashbinActivityIn
 
     @Override
     public void showError(int message) {
-        swipeListRefreshLayout.setRefreshing(false);
+        if (swipeListRefreshLayout != null) {
+            swipeListRefreshLayout.setRefreshing(false);
+        }
 
-        if (emptyContentMessage != null) {
+        if (emptyContentMessage != null && emptyContentHeadline != null && emptyContentIcon != null) {
             emptyContentHeadline.setText(R.string.common_error);
             emptyContentIcon.setImageDrawable(getResources().getDrawable(R.drawable.ic_list_empty_error));
             emptyContentMessage.setText(message);