Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #24409 : crash when creating a new SimpleText element or adidgin text to an empty one #666

Merged
merged 2 commits into from Jan 28, 2014
Merged

Fix #24409 : crash when creating a new SimpleText element or adidgin text to an empty one #666

merged 2 commits into from Jan 28, 2014

Conversation

mgavioli
Copy link
Contributor

When some text is typed for a newly created SimpleText text item (staff, system, ...), the program crashes.

  • Added a test to check the SimpleText::_text list is not empty before adding to it.
  • Added another test to check TLine::_text list is not empty before taking its y coord.

When some text is typed for a newly created SimpleText text item (staff, system, ...), the program crashes.

Added a test to check the SimpleTex::_text list is not empty before adding to it.
@Jojo-Schmitz
Copy link
Contributor

Is this supposed to fix #24409? Just trying to connect the dots...

@mgavioli
Copy link
Contributor Author

Probably it fixes this too, but I just got a crash while adding a staff text and tried to fix it to go on working. If it useful, it is there.

@Jojo-Schmitz
Copy link
Contributor

No, unfortunately it does not, I've just tried it. Nor does it fix the issue with system- and staff text, not for me at least

@Jojo-Schmitz
Copy link
Contributor

Additionally changing line 564 of libmscore\simpletext.cpp back to
qreal y = _cursor.line * h;
like it was some commits ago, seems to fix the crash. No idea whether it is the right solution though.

Jojo-Schmitz added a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jan 27, 2014
or staff- or system text.
Using the change from PR musescore#666 and additionaly reverting one line back to
what it was before commit 95bf389.
Adds another test for TLine::_text being empty or not.
wschweer added a commit that referenced this pull request Jan 28, 2014
Fix #24409 : crash when creating a new SimpleText element or adidgin text to an empty one
@wschweer wschweer merged commit 49097c2 into musescore:master Jan 28, 2014
@mgavioli mgavioli deleted the Fix_crash_on_adding_to_SimpleText branch January 28, 2014 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants