summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorGergo Mocsi <gmocsi91@gmail.com>2013-07-26 10:29:00 +0200
committerGergo Mocsi <gmocsi91@gmail.com>2013-09-02 18:16:50 +0200
commit776734d8dd23766d3bd0bb901b4f97be05681c75 (patch)
treeef667ed7e779c40ab287274f02a5b231b11b9cc1 /basctl
parent40433e2ca977173ae6909fc5c47601e11ef003e4 (diff)
GSOC work, fix runtime crash
Fixes runtime crash by not checking the string length in "Autoclose Quotes" funtion. Change-Id: I15e58a0fd487ce86b832452a562406b8155b2641
Diffstat (limited to 'basctl')
-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 cf2530f6e47d..7578f85241b2 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -513,7 +513,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