From d38a0ee851c3aadef1348cfb9c8c4673bd883119 Mon Sep 17 00:00:00 2001 From: simon Date: Tue, 20 Jan 2009 18:40:07 +0000 Subject: [PATCH] Prevent obvious NULL dereference if you paste before cutting or copying. git-svn-id: svn://svn.tartarus.org/sgt/tweak@8423 cda61777-01e9-0310-a592-d414129be87e --- actions.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/actions.c b/actions.c index a6d96bd..fb71b9f 100644 --- a/actions.c +++ b/actions.c @@ -462,6 +462,8 @@ static void act_copy (void) { static void act_paste (void) { fileoffset_t cutsize, new_top; + if (!cutbuffer) + return; cutsize = buf_length (cutbuffer); if (!insert_mode) { if (cur_pos + cutsize > file_size) { -- 2.11.0