summaryrefslogtreecommitdiff
path: root/src/ex_docmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r--src/ex_docmd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 83cffc1fc..246c4c0b2 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -6728,6 +6728,10 @@ handle_drop(filec, filev, split)
if (curbuf_locked())
return;
#endif
+ /* When the screen is being updated we should not change buffers and
+ * windows structures, it may cause freed memory to be used. */
+ if (updating_screen)
+ return;
/* Check whether the current buffer is changed. If so, we will need
* to split the current window or data could be lost.