Skip to content
Snippets Groups Projects
Commit 2454b2e0 authored by Alex Hart's avatar Alex Hart
Browse files

Fix crash when trying to access media controller after activity is destroyed...

Fix crash when trying to access media controller after activity is destroyed and reference is nullified.
parent 0505a466
Branches
Tags
No related merge requests found
...@@ -146,7 +146,11 @@ public class VoiceNoteMediaController implements DefaultLifecycleObserver { ...@@ -146,7 +146,11 @@ public class VoiceNoteMediaController implements DefaultLifecycleObserver {
} }
private @Nullable MediaControllerCompat getMediaController() { private @Nullable MediaControllerCompat getMediaController() {
if (activity != null) {
return MediaControllerCompat.getMediaController(activity); return MediaControllerCompat.getMediaController(activity);
} else {
return null;
}
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment