Skip to content

Commit a5eb057

Browse files
shuirnamingmwan
andauthored
Fix crash issue: TypeCastException when construct SaveState (alamkanak#144)
Stack: Caused by kotlin.TypeCastException null cannot be cast to non-null type java.util.Calendar com.alamkanak.weekview.SavedState.<init> (SavedState.kt:26) Co-authored-by: mingmwan <[email protected]>
1 parent b169909 commit a5eb057

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/java/com/alamkanak/weekview/SavedState.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ internal class SavedState : BaseSavedState {
2323

2424
constructor(source: Parcel) : super(source) {
2525
numberOfVisibleDays = source.readInt()
26-
firstVisibleDate = source.readSerializable() as Calendar
26+
firstVisibleDate = source.readSerializable() as? Calendar
2727
}
2828

2929
override fun writeToParcel(out: Parcel, flags: Int) {

0 commit comments

Comments
 (0)