Prevent NPE
This commit is contained in:
parent
b6f15456cc
commit
ef0a44e276
|
@ -256,7 +256,7 @@ class Widget : AppWidgetProvider() {
|
|||
|
||||
internal fun updateWidget(context: Context) {
|
||||
context.sendBroadcast(Intent().also {
|
||||
it.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, AppWidgetManager.getInstance(context).getAppWidgetIds(ComponentName(context, Widget::class.java)))
|
||||
it.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, AppWidgetManager.getInstance(context)?.getAppWidgetIds(ComponentName(context, Widget::class.java)))
|
||||
it.action = AppWidgetManager.ACTION_APPWIDGET_UPDATE
|
||||
})
|
||||
}
|
Loading…
Reference in a new issue