Hugh McMaster : kernel32: Check for a valid pointer before yanking the line.

Alexandre Julliard julliard at winehq.org
Tue Feb 28 03:45:55 CST 2017


Module: wine
Branch: oldstable
Commit: bde2d0a8495ed734bc8ca4df06e568de6232cdfb
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=bde2d0a8495ed734bc8ca4df06e568de6232cdfb

Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date:   Tue Dec 13 12:00:03 2016 +0000

kernel32: Check for a valid pointer before yanking the line.

Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 8cacba5ff942ee91124895bb10fec026556cdf6f)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>

---

 dlls/kernel32/editline.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/kernel32/editline.c b/dlls/kernel32/editline.c
index 78ea789..6d2ad17 100644
--- a/dlls/kernel32/editline.c
+++ b/dlls/kernel32/editline.c
@@ -635,7 +635,8 @@ static void WCEL_CapitalizeWord(WCEL_Context* ctx)
 
 static void WCEL_Yank(WCEL_Context* ctx)
 {
-    WCEL_InsertString(ctx, ctx->yanked);
+    if (ctx->yanked)
+        WCEL_InsertString(ctx, ctx->yanked);
 }
 
 static void WCEL_KillToEndOfLine(WCEL_Context* ctx)




More information about the wine-cvs mailing list