summaryrefslogtreecommitdiff
path: root/src/mir_core
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-02-05 21:09:04 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-02-05 21:09:04 +0000
commite8a21391ff01376e7d76307ee2c682be222f74c0 (patch)
treea0840c0622bbcc8e937da8ebe5c60c5c83178f46 /src/mir_core
parente9b379bc27f64fc5d31fd894c95a1da5a18f1795 (diff)
- Attempt to fix crash on startup (fixes #876)
git-svn-id: http://svn.miranda-ng.org/main/trunk@12013 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/mir_core')
-rw-r--r--src/mir_core/src/protos.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mir_core/src/protos.cpp b/src/mir_core/src/protos.cpp
index 975786111f..e187c9d251 100644
--- a/src/mir_core/src/protos.cpp
+++ b/src/mir_core/src/protos.cpp
@@ -49,14 +49,14 @@ MIR_CORE_DLL(void) ProtoLogA(struct PROTO_INTERFACE *pThis, LPCSTR szFormat, va_
{
char buf[4096];
int res = _vsnprintf(buf, sizeof(buf), szFormat, args);
- CallService(MS_NETLIB_LOG, (WPARAM)pThis->m_hNetlibUser, (LPARAM)((res != -1) ? buf : CMStringA().FormatV(szFormat, args)));
+ CallService(MS_NETLIB_LOG, (WPARAM)(pThis ? pThis->m_hNetlibUser : NULL), (LPARAM)((res != -1) ? buf : CMStringA().FormatV(szFormat, args)));
}
MIR_CORE_DLL(void) ProtoLogW(struct PROTO_INTERFACE *pThis, LPCWSTR wszFormat, va_list args)
{
WCHAR buf[4096];
int res = _vsnwprintf(buf, SIZEOF(buf), wszFormat, args);
- CallService(MS_NETLIB_LOGW, (WPARAM)pThis->m_hNetlibUser, (LPARAM)((res != -1) ? buf : CMStringW().FormatV(wszFormat, args)));
+ CallService(MS_NETLIB_LOGW, (WPARAM)(pThis ? pThis->m_hNetlibUser : NULL), (LPARAM)((res != -1) ? buf : CMStringW().FormatV(wszFormat, args)));
}
/////////////////////////////////////////////////////////////////////////////////////////