diff --git a/edit/editcmd.c b/edit/editcmd.c index 92fc807bf..eb3a5ff66 100644 --- a/edit/editcmd.c +++ b/edit/editcmd.c @@ -2442,7 +2442,7 @@ edit_ext_cmd (WEdit *edit) goto cleanup; } - if (edit_block_delete_cmd (edit) != 0) + if (block != NULL && edit_block_delete_cmd (edit) != 0) goto cleanup; if (outbuf.data != NULL) {