fdo#73698 check for empty aOut

Change-Id: I0da26ef746553618bd8aee69f21ff0d1261efbf6
Reviewed-on: https://gerrit.libreoffice.org/7474
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
This commit is contained in:
Andras Timar 2014-01-16 16:48:41 +01:00 committed by Noel Grandin
parent 0853bbc380
commit 99159a618f

View File

@ -983,7 +983,7 @@ void SbiIoSystem::WriteCon(const OUString& rText)
}
OUString s(aOut.copy(0, n1));
aOut = aOut.copy(n1);
while (aOut[0] == '\n' || aOut[0] == '\r')
while ( !aOut.isEmpty() && (aOut[0] == '\n' || aOut[0] == '\r') )
{
aOut = aOut.copy(1);
}