diff --git a/WordPress/src/main/java/org/wordpress/android/ui/posts/EditPostActivity.java b/WordPress/src/main/java/org/wordpress/android/ui/posts/EditPostActivity.java index 8eb3b555a0c8..f37bd022b9ce 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/posts/EditPostActivity.java +++ b/WordPress/src/main/java/org/wordpress/android/ui/posts/EditPostActivity.java @@ -71,6 +71,7 @@ import org.wordpress.android.editor.EditorMediaUtils; import org.wordpress.android.editor.EditorThemeUpdateListener; import org.wordpress.android.editor.ExceptionLogger; +import org.wordpress.android.editor.gutenberg.GutenbergNetworkConnectionListener; import org.wordpress.android.editor.savedinstance.SavedInstanceDatabase; import org.wordpress.android.editor.gutenberg.DialogVisibility; import org.wordpress.android.editor.gutenberg.GutenbergEditorFragment; @@ -3844,6 +3845,8 @@ public void onEventMainThread(UploadService.UploadMediaRetryEvent event) { @Subscribe(threadMode = ThreadMode.MAIN) public void onEventMainThread(ConnectionChangeReceiver.ConnectionChangeEvent event) { + if (!(mEditorFragment instanceof GutenbergNetworkConnectionListener)) return; + ((GutenbergEditorFragment) mEditorFragment).onConnectionStatusChange(event.isConnected()); }