[Ttssh2-commit] [8457] クリップボードを閉じない場合があったので修正

scmno****@osdn***** scmno****@osdn*****
2020年 1月 10日 (金) 22:12:01 JST


Revision: 8457
          https://osdn.net/projects/ttssh2/scm/svn/commits/8457
Author:   zmatsuo
Date:     2020-01-10 22:12:00 +0900 (Fri, 10 Jan 2020)
Log Message:
-----------
クリップボードを閉じない場合があったので修正

- r8371
- [Ttssh2-devel 4356]

Revision Links:
--------------
    https://osdn.net/projects/ttssh2/scm/svn/commits/8371

Modified Paths:
--------------
    trunk/teraterm/teraterm/clipboar.c

-------------- next part --------------
Modified: trunk/teraterm/teraterm/clipboar.c
===================================================================
--- trunk/teraterm/teraterm/clipboar.c	2020-01-07 15:44:00 UTC (rev 8456)
+++ trunk/teraterm/teraterm/clipboar.c	2020-01-10 13:12:00 UTC (rev 8457)
@@ -1304,10 +1304,12 @@
 		const size_t alloc_bytes = (str_len + 1) * sizeof(wchar_t);
 		CBCopyWideHandle = GlobalAlloc(GMEM_MOVEABLE, alloc_bytes);
 		if (CBCopyWideHandle == NULL) {
+			CloseClipboard();
 			return FALSE;
 		}
 		CBCopyWidePtr = (wchar_t *)GlobalLock(CBCopyWideHandle);
 		if (CBCopyWidePtr == NULL) {
+			CloseClipboard();
 			return FALSE;
 		}
 		memcpy(CBCopyWidePtr, str_w, alloc_bytes - sizeof(wchar_t));


Ttssh2-commit メーリングリストの案内