From eb4a70dde5107116aa29b7a673f34a27a71fcd5d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 14 Oct 2012 19:50:12 +0000 Subject: crash fix for exporting empty events git-svn-id: http://svn.miranda-ng.org/main/trunk@1939 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Msg_Export/src/utils.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins/Msg_Export/src/utils.cpp b/plugins/Msg_Export/src/utils.cpp index ae45d82bad..79c6ff29b8 100755 --- a/plugins/Msg_Export/src/utils.cpp +++ b/plugins/Msg_Export/src/utils.cpp @@ -1502,6 +1502,9 @@ bool bWriteIndentedToFile( HANDLE hFile , int nIndent , const char * pszSrc , bo bool bWriteIndentedToFile( HANDLE hFile , int nIndent , const _TCHAR * pszSrc , bool bUtf8File ) { + if (pszSrc == NULL) + return true; + bool bOk = true; bool bFirstLine = true; @@ -1510,13 +1513,8 @@ bool bWriteIndentedToFile( HANDLE hFile , int nIndent , const _TCHAR * pszSrc , int nLineLen = 0; do { -/* if( bUtf8Src ) - { // need to do some stuff here - }*/ if( pszSrc[nLineLen] == _T('\n') || pszSrc[nLineLen] == _T('\r')) - { // the line naturly broken here stop scan break; - } if( nLineLen >= nMaxLineWidth ) { // ok the line was not broken. we need to force a break -- cgit v1.2.3