summaryrefslogtreecommitdiffstats
path: root/win/tkWinWm.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-09-25 11:02:53 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-09-25 11:02:53 (GMT)
commit4f50f28c932648028f5e4056ea7fcd0fcf84b670 (patch)
tree062a7572cfa2496946ce2b784558466af2f5ad68 /win/tkWinWm.c
parent202e2b4510669128db1f8fc72b094456d5bef5d4 (diff)
downloadtk-4f50f28c932648028f5e4056ea7fcd0fcf84b670.zip
tk-4f50f28c932648028f5e4056ea7fcd0fcf84b670.tar.gz
tk-4f50f28c932648028f5e4056ea7fcd0fcf84b670.tar.bz2
Fix 2 left-over Tcl_WinUtfToTChar() calls. Some more code cleanup, made possible by TIP #548
Diffstat (limited to 'win/tkWinWm.c')
-rw-r--r--win/tkWinWm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index 83ff7d0..d273b4c 100644
--- a/win/tkWinWm.c
+++ b/win/tkWinWm.c
@@ -1242,10 +1242,9 @@ ReadIconFromFile(
return NULL;
}
Tcl_DStringInit(&ds2);
- Tcl_UtfToWCharDString(file, -1, &ds2);
- Tcl_DStringFree(&ds);
- res = (DWORD *)SHGetFileInfoW((WCHAR *)Tcl_DStringValue(&ds2), 0, &sfiSM,
+ res = (DWORD *)SHGetFileInfoW(Tcl_UtfToWCharDString(file, -1, &ds2), 0, &sfiSM,
sizeof(SHFILEINFO), SHGFI_SMALLICON|SHGFI_ICON);
+ Tcl_DStringFree(&ds);
if (res != 0) {
SHFILEINFOW sfi;