diff options
author | Gergo Mocsi <gmocsi91@gmail.com> | 2013-07-26 10:29:00 +0200 |
---|---|---|
committer | Gergo Mocsi <gmocsi91@gmail.com> | 2013-09-02 18:16:50 +0200 |
commit | 776734d8dd23766d3bd0bb901b4f97be05681c75 (patch) | |
tree | ef667ed7e779c40ab287274f02a5b231b11b9cc1 /basctl | |
parent | GSOC work, implemented "Autoclose Double Quotes" option (diff) | |
download | core-776734d8dd23766d3bd0bb901b4f97be05681c75.tar.gz core-776734d8dd23766d3bd0bb901b4f97be05681c75.zip |
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.cxx | 2 |
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 |