-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix NPE in PreviewMediaFragment #4577
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix NPE in PreviewMediaFragment #4577
Conversation
61a6385 to
c660ca7
Compare
|
@tobiasKaminsky @AndyScherzinger |
Fragment can be detached before async task finishes. Detached fragment has no context and getString() fails with NPE. Fixes #4412 Signed-off-by: Chris Narkiewicz <hello@ezaquarii.com>
c1b0aa9 to
488193a
Compare
|
/backport to stable-3.8 |
|
Thanks for the finding! |
|
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/11062.apk |
Codacy273Lint
SpotBugs (new)
SpotBugs (master)
|
Codecov Report
@@ Coverage Diff @@
## master #4577 +/- ##
==========================================
+ Coverage 16.99% 17.2% +0.2%
Complexity 3 3
==========================================
Files 365 375 +10
Lines 32093 33424 +1331
Branches 4519 4902 +383
==========================================
+ Hits 5454 5750 +296
- Misses 25748 26752 +1004
- Partials 891 922 +31
|
|
backport to stable-3.8 in #4594 |
59e1f7f Merge pull request #4357 from nextcloud/changeDroneOrder c9e9fe1 Merge pull request #4597 from nextcloud/buildAgain 7ebc88d make build run again 4f15e87 Merge pull request #4592 from nextcloud/parentCheck b204db0 Merge pull request #4577 from nextcloud/ezaquarii/fix-npe-in-preview-media-fragment 9876c49 Merge pull request #4415 from nextcloud/dependabot/gradle/io.gitlab.arturbosch.detekt-detekt-gradle-plugin-1.0.1 9a580b3 Merge pull request #4591 from nextcloud/dependabot/gradle/org.mockito-mockito-core-3.1.0 f6e24eb if parent is null, then do a regular check, no early exit 0dfdc6a Bump mockito-core from 3.0.0 to 3.1.0 9133158 [tx-robot] updated from transifex 7d8474e daily dev 20191002

Fragment can be detached when async task finishes.
Detached fragment has no context and getString() fails with NPE.
Fixes #4582
Signed-off-by: Chris Narkiewicz hello@ezaquarii.com