GSOC work, fix runtime crash
Fixes runtime crash by not checking the string length in "Autoclose Quotes" funtion. Change-Id: I15e58a0fd487ce86b832452a562406b8155b2641
This commit is contained in:
@@ -513,7 +513,7 @@ void EditorWindow::KeyInput( const KeyEvent& rKEvt )
|
|||||||
|
|
||||||
HighlightPortions aPortions;
|
HighlightPortions aPortions;
|
||||||
aHighlighter.getHighlightPortions( nLine, aLine, aPortions );
|
aHighlighter.getHighlightPortions( nLine, aLine, aPortions );
|
||||||
if( aLine[aLine.getLength()-1] != '"' && (aPortions[aPortions.size()-1].tokenType != 4) )
|
if( aLine.getLength() > 0 && aLine[aLine.getLength()-1] != '"' && (aPortions[aPortions.size()-1].tokenType != 4) )
|
||||||
{
|
{
|
||||||
GetEditView()->InsertText(OUString("\""));
|
GetEditView()->InsertText(OUString("\""));
|
||||||
//leave the cursor on it's place: inside the two double quotes
|
//leave the cursor on it's place: inside the two double quotes
|
||||||
|
Reference in New Issue
Block a user