diff --git a/collect_app/src/main/java/org/odk/collect/android/tasks/FormLoaderTask.java b/collect_app/src/main/java/org/odk/collect/android/tasks/FormLoaderTask.java index 9c8d9183978..7251c9c3f15 100644 --- a/collect_app/src/main/java/org/odk/collect/android/tasks/FormLoaderTask.java +++ b/collect_app/src/main/java/org/odk/collect/android/tasks/FormLoaderTask.java @@ -121,6 +121,12 @@ protected FECWrapper doInBackground(String... path) { errorMsg = null; final String formPath = path[0]; + if (formPath == null) { + Timber.e("formPath is null"); + errorMsg = "formPath is null, please post on the forum with a description of what you were doing when this happened."; + return null; + } + final File formXml = new File(formPath); final File formMediaDir = FileUtils.getFormMediaDir(formXml);