java.lang.NullPointerException: Attempt to read from field 'com.google.android.material.appbar.AppBarLayout org.schabi.newpipe.databinding.FragmentVideoDetailBinding.appBarLayout' on a null object reference in method 'void org.schabi.newpipe.fragments.detail.VideoDetailFragment$$ExternalSyntheticLambda1.run()'
at org.schabi.newpipe.fragments.detail.VideoDetailFragment$$ExternalSyntheticLambda1.run(r8-map-id-b536a7dbb08187839d047806301a0d5063a28fe76cc0c0e7f4cdd1ae4d7ad208:12)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8762)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
Checklist
Affected version
Android 13
Steps to reproduce the bug
Set History as first tab on main page from Content of main page Settings.
Change Night theme to Black (Note it is only available when Theme is set to Automatic device theme, though it should be greyed out when theme is other than automatic as in official app, but that is another thing)
Use app by playing some videos in background by enqueueing & playing more of them from related items so that some streams are in backstack, when we press device back button to go back to previous stream, during meantime when previous stream is loading spinner is rotating, open drawer by swiping from left, Try to change Appearance from automatic theme to light to dark to black to automatic in cycle more than one time, go back each time after change theme to see the effect on app appearance, you would be able to reproduce the bug.
Expected behavior
There sould be no crash as upstream Vanilla NewPipe.
Actual behavior
Ir produces a crash after changing theme to dark under certain scenarios.
Screenshots/Screen recordings
No response
Logs
Exception
Crash log
Affected Android/Custom ROM version
Android 13
Affected device model
Samsung A70s
Additional information
No response