Skip to content

Commit

Permalink
Fix #24409: crash when adding textual elements
Browse files Browse the repository at this point in the history
Adds another test for TLine::_text being empty or not.
  • Loading branch information
mgavioli committed Jan 27, 2014
1 parent 6dd8648 commit 98df317
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libmscore/simpletext.h
Expand Up @@ -100,7 +100,7 @@ class TLine {
int column(qreal x, SimpleText*) const;
TLine split(int column);
qreal xpos(int col, const SimpleText*) const;
qreal y() const { return _text.front().pos.y(); }
qreal y() const { return _text.isEmpty() ? 0 : _text.front().pos.y(); }
};

//---------------------------------------------------------
Expand Down

0 comments on commit 98df317

Please sign in to comment.