summaryrefslogtreecommitdiff
path: root/app/wlib/mswlib/mswsplash.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2020-08-22 14:05:41 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2020-08-22 14:05:41 +0200
commitb55285a77da0e0b829e4ce8d7e09debaabc68e15 (patch)
treef622559ef65bbdd3e1c5bdb06098a8f89eec0563 /app/wlib/mswlib/mswsplash.c
parentd3897ce090dbeb220ed2c782f095597e417cf3cc (diff)
parentd1ae75703e1ed81d65ea16946dcdb77e7a13adc9 (diff)
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'app/wlib/mswlib/mswsplash.c')
-rw-r--r--app/wlib/mswlib/mswsplash.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/wlib/mswlib/mswsplash.c b/app/wlib/mswlib/mswsplash.c
index 47df6b7..172b563 100644
--- a/app/wlib/mswlib/mswsplash.c
+++ b/app/wlib/mswlib/mswsplash.c
@@ -204,8 +204,11 @@ wCreateSplash( char *appname, char *appver )
/* create the title string */
pszBuf = malloc( strlen( appname ) + strlen( appver ) + 2 );
- if( !pszBuf )
- return( 0 );
+ if (!pszBuf) {
+ GlobalUnlock(hgbl);
+ GlobalFree(hgbl);
+ return(0);
+ }
sprintf( pszBuf, "%s %s", appname, appver );
lpw += 1+MultiByteToWideChar (CP_ACP, 0, pszBuf, -1, (LPWSTR)lpw, 50);
@@ -226,7 +229,6 @@ wCreateSplash( char *appname, char *appver )
GlobalUnlock(hgbl);
hSplash = CreateDialogIndirectParam( mswHInst, (LPDLGTEMPLATE) hgbl,
mswHWnd, (DLGPROC)SplashDlgProc, (LPARAM)hBmp );
- GetLastError();
/* free allocated memory */
GlobalFree(hgbl);