summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-10-14 19:50:12 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-10-14 19:50:12 +0000
commiteb4a70dde5107116aa29b7a673f34a27a71fcd5d (patch)
tree3ce9266eb199c343f3de9a261ca86d56e48e9e50
parent1be888f73671b6c41e16a5b060ee323d0936bf77 (diff)
crash fix for exporting empty events
git-svn-id: http://svn.miranda-ng.org/main/trunk@1939 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rwxr-xr-xplugins/Msg_Export/src/utils.cpp8
1 files 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