adding a crashfix

This commit is contained in:
tibbi 2022-11-05 23:21:45 +01:00
parent 65be6e6f80
commit 8a1f0d4feb
2 changed files with 4 additions and 1 deletions

View file

@ -141,7 +141,9 @@ class ChangeSortingDialog(val activity: Activity, val location: Int, val playlis
if (view.sorting_dialog_use_for_this_playlist.isChecked) {
config.saveCustomPlaylistSorting(playlist!!.id, sorting)
} else {
config.removeCustomPlaylistSorting(playlist!!.id)
if (playlist != null) {
config.removeCustomPlaylistSorting(playlist.id)
}
config.playlistTracksSorting = sorting
}
}

View file

@ -54,6 +54,7 @@
android:id="@+id/sorting_dialog_use_for_this_playlist"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:checked="false"
android:paddingTop="@dimen/activity_margin"
android:paddingBottom="@dimen/activity_margin"
android:text="@string/use_for_this_playlist" />