diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java b/core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java index 73037d771..fa4a5726a 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java +++ b/core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java @@ -309,7 +309,11 @@ public class PodDBAdapter { dbHelper.close(); dbHelper = null; } - return context.deleteDatabase(PodDBAdapter.DATABASE_NAME); + if(context != null) { // may not have been initialized + return context.deleteDatabase(PodDBAdapter.DATABASE_NAME); + } else { + return false; + } } /**