diff --git a/astrid/src/com/todoroo/astrid/widget/TasksWidget.java b/astrid/src/com/todoroo/astrid/widget/TasksWidget.java index 1f9541a27..c88365f3c 100644 --- a/astrid/src/com/todoroo/astrid/widget/TasksWidget.java +++ b/astrid/src/com/todoroo/astrid/widget/TasksWidget.java @@ -26,10 +26,10 @@ import com.todoroo.andlib.service.DependencyInjectionService; import com.todoroo.andlib.utility.AndroidUtilities; import com.todoroo.andlib.utility.DateUtilities; import com.todoroo.andlib.utility.Preferences; -import com.todoroo.astrid.activity.TaskEditFragment; import com.todoroo.astrid.activity.TaskEditActivity; -import com.todoroo.astrid.activity.TaskListFragment; +import com.todoroo.astrid.activity.TaskEditFragment; import com.todoroo.astrid.activity.TaskListActivity; +import com.todoroo.astrid.activity.TaskListFragment; import com.todoroo.astrid.api.Filter; import com.todoroo.astrid.api.FilterWithCustomIntent; import com.todoroo.astrid.api.PermaSql; @@ -227,7 +227,8 @@ public class TasksWidget extends AppWidgetProvider { } PendingIntent pListIntent = PendingIntent.getActivity(context, widgetId, listIntent, PendingIntent.FLAG_CANCEL_CURRENT); - views.setOnClickPendingIntent(R.id.taskbody, pListIntent); + if (pListIntent != null) + views.setOnClickPendingIntent(R.id.taskbody, pListIntent); Intent editIntent = new Intent(context, TaskEditActivity.class); @@ -246,8 +247,10 @@ public class TasksWidget extends AppWidgetProvider { } PendingIntent pEditIntent = PendingIntent.getActivity(context, -widgetId, editIntent, 0); - views.setOnClickPendingIntent(R.id.widget_button, pEditIntent); - views.setOnClickPendingIntent(R.id.widget_title, pEditIntent); + if (pEditIntent != null) { + views.setOnClickPendingIntent(R.id.widget_button, pEditIntent); + views.setOnClickPendingIntent(R.id.widget_title, pEditIntent); + } return views; }