kopia lustrzana https://github.com/ryukoposting/Signal-Android
Fix crash when trying to access media controller after activity is destroyed and reference is nullified.
rodzic
0505a46603
commit
2454b2e0db
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue