summaryrefslogtreecommitdiff
path: root/win32/perlhost.h
diff options
context:
space:
mode:
Diffstat (limited to 'win32/perlhost.h')
-rw-r--r--win32/perlhost.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/win32/perlhost.h b/win32/perlhost.h
index 458ff9afc9..e52ba6d419 100644
--- a/win32/perlhost.h
+++ b/win32/perlhost.h
@@ -593,9 +593,10 @@ public:
}
if (0 == dwLen) {
sMsg = (char*)LocalAlloc(0, 64/**sizeof(TCHAR)*/);
- dwLen = sprintf(sMsg,
- "Unknown error #0x%lX (lookup 0x%lX)",
- dwErr, GetLastError());
+ if (sMsg)
+ dwLen = sprintf(sMsg,
+ "Unknown error #0x%lX (lookup 0x%lX)",
+ dwErr, GetLastError());
}
};
virtual void FreeBuf(char* sMsg)