small context handling change in widget

This commit is contained in:
tibbi 2016-05-31 17:14:28 +02:00
parent f0d6aea9b2
commit d849b2f686

View file

@ -30,7 +30,7 @@ public class MyWidgetProvider extends AppWidgetProvider {
@Override
public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
initVariables(cxt);
initVariables(context);
super.onUpdate(context, appWidgetManager, appWidgetIds);
}
@ -139,7 +139,7 @@ public class MyWidgetProvider extends AppWidgetProvider {
@Override
public void onReceive(Context context, Intent intent) {
if (remoteViews == null || widgetManager == null || bus == null) {
if (remoteViews == null || widgetManager == null || bus == null || cxt == null) {
initVariables(context);
}