diff --git a/app/src/main/java/com/pangbai/weblog/activity/MainActivity.java b/app/src/main/java/com/pangbai/weblog/activity/MainActivity.java index 8c6e86f..4bab7df 100644 --- a/app/src/main/java/com/pangbai/weblog/activity/MainActivity.java +++ b/app/src/main/java/com/pangbai/weblog/activity/MainActivity.java @@ -458,8 +458,10 @@ void checkProcess(MenuItem item) { @Override protected void onDestroy() { //binding.editor.setEditorLanguage(null); - binding.editor.release(); - markdown.destroyWebView(); + if (binding!=null) { + binding.editor.release(); + markdown.destroyWebView(); + } super.onDestroy(); } }