diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/MyWidgetMonthlyProvider.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/MyWidgetMonthlyProvider.kt index a07e7850c..c499c3a10 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/MyWidgetMonthlyProvider.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/MyWidgetMonthlyProvider.kt @@ -99,6 +99,10 @@ class MyWidgetMonthlyProvider : AppWidgetProvider(), MonthlyCalendar { override fun onReceive(context: Context, intent: Intent) { val action = intent.action + if (mCalendar == null) { + initVariables(context) + } + when (action) { PREV -> mCalendar?.getPrevMonth() NEXT -> mCalendar?.getNextMonth()