Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed possible crash on indent

  • Loading branch information...
commit abba0f9256ba461963c5805cc00cfc870e7b4731 1 parent 30f0499
@bmcdorman bmcdorman authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  src/SourceFile.cpp
View
3  src/SourceFile.cpp
@@ -275,7 +275,8 @@ bool SourceFile::openProjectFile(Project* project, const TinyNode* node)
void SourceFile::indentAll()
{
if(!ui_editor->lexer()) return;
- if(!dynamic_cast<Lexer::LexerBase*>(ui_editor->lexer())->cStyleBlocks()) return;
+ LexerBase *lexerBase = dynamic_cast<Lexer::LexerBase*>(ui_editor->lexer());
+ if(!lexerBase || !lexerBase->cStyleBlocks()) return;
setUpdatesEnabled(false);
Please sign in to comment.
Something went wrong with that request. Please try again.