From b5f72faf2d498f1c28192fce2eb1137228e80148 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 2 Dec 2019 10:17:43 +0100 Subject: [PATCH] adding some resources null checks --- .../simplemobiletools/gallery/pro/fragments/PhotoFragment.kt | 2 +- .../simplemobiletools/gallery/pro/fragments/VideoFragment.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt index 10f85ce02..456680c0b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt @@ -771,7 +771,7 @@ class PhotoFragment : ViewPagerFragment() { this.mIsFullscreen = isFullscreen mView.apply { photo_details.apply { - if (mStoredShowExtendedDetails && isVisible() && context != null) { + if (mStoredShowExtendedDetails && isVisible() && context != null && resources != null) { animate().y(getExtendedDetailsY(height)) if (mStoredHideExtendedDetails) { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/VideoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/VideoFragment.kt index df99218b9..d120839ae 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/VideoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/VideoFragment.kt @@ -460,7 +460,7 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S mTimeHolder.animate().alpha(newAlpha).start() mView.video_details.apply { - if (mStoredShowExtendedDetails && isVisible() && context != null) { + if (mStoredShowExtendedDetails && isVisible() && context != null && resources != null) { animate().y(getExtendedDetailsY(height)) if (mStoredHideExtendedDetails) {