summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basctl/source/basicide/baside2b.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index d75aae98cffd..c533ebcf575a 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -507,7 +507,7 @@ void EditorWindow::KeyInput( const KeyEvent& rKEvt )
HighlightPortions 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("\""));
//leave the cursor on it's place: inside the two double quotes