瀏覽代碼

Fix rotation crash

Signed-off-by: Mario Danic <mario@lovelyhq.com>
Mario Danic 7 年之前
父節點
當前提交
812ad18881
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/main/java/com/owncloud/android/ui/fragment/ExtendedListFragment.java

+ 1 - 1
src/main/java/com/owncloud/android/ui/fragment/ExtendedListFragment.java

@@ -955,7 +955,7 @@ public class ExtendedListFragment extends Fragment
             maxColumnSize = maxColumnSizePortrait;
         }
 
-        if (mGridView.getNumColumns() > maxColumnSize) {
+        if (mGridView != null && mGridView.getNumColumns() > maxColumnSize) {
             mGridView.setNumColumns(maxColumnSize);
             mGridView.invalidateViews();
         }