summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGergo Mocsi <gmocsi91@gmail.com>2013-07-26 10:29:00 +0200
committerGergo Mocsi <gmocsi91@gmail.com>2013-07-26 10:29:00 +0200
commite9d2993bd7a5e5dd354b2d6e8f1ac7d5fc9c7a33 (patch)
tree6e91335183600f4a1d13e99e8a27cc60f811c15f
parent2284b77b6c2b8bd6485130157c6cf0b4e51122a8 (diff)
GSOC work, fix runtime crash
Fixes runtime crash by not checking the string length in "Autoclose Quotes" funtion. Change-Id: I15e58a0fd487ce86b832452a562406b8155b2641
-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