mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-25 20:23:19 +00:00
Fix crash when trying to access media controller after activity is destroyed and reference is nullified.
This commit is contained in:
@@ -146,7 +146,11 @@ public class VoiceNoteMediaController implements DefaultLifecycleObserver {
|
||||
}
|
||||
|
||||
private @Nullable MediaControllerCompat getMediaController() {
|
||||
return MediaControllerCompat.getMediaController(activity);
|
||||
if (activity != null) {
|
||||
return MediaControllerCompat.getMediaController(activity);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user