mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2024-12-22 16:50:04 +02:00
Fix a crash
This commit is contained in:
parent
90a6a6ceaa
commit
e4affdc9d7
2 changed files with 9 additions and 4 deletions
|
@ -154,6 +154,7 @@
|
|||
android:id="@+id/nav_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:labelVisibilityMode="unlabeled"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginEnd="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
|
|
@ -158,15 +158,19 @@ public class BasePeertubeActivity extends BaseBarActivity {
|
|||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
mCastContext.getSessionManager().addSessionManagerListener(
|
||||
mSessionManagerListener, CastSession.class);
|
||||
if (mCastContext != null) {
|
||||
mCastContext.getSessionManager().addSessionManagerListener(
|
||||
mSessionManagerListener, CastSession.class);
|
||||
}
|
||||
super.onResume();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
mCastContext.getSessionManager().removeSessionManagerListener(
|
||||
mSessionManagerListener, CastSession.class);
|
||||
if (mCastContext != null) {
|
||||
mCastContext.getSessionManager().removeSessionManagerListener(
|
||||
mSessionManagerListener, CastSession.class);
|
||||
}
|
||||
super.onPause();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue