[trunk] Cancel on Style | Text Style dlg box crashes if no edits

• Jul 10, 2011 - 09:44
Type
Functional
Severity
S2 - Critical
Status
closed
Project

Very similar to this issue ; the proposed patch is also very similar.

Setup: rev. 4504; Ubuntu 11.04, Qt SDK 1.1.2 (Qt lib 4.7.4)

Steps:

1) Open or create any score
2) Select "Style | Edit text styles"
3) Press [Cancel] without changing anything

Result: the programme crashes.

Note:

Happens in file mscore/mscore/mscore/textstyle.cpp, line 106, function TextStyleDialog::buttonClicked(), case default, because cs->undo()->current() can be null.

The attached patch checks for the existence of the objects before calling them.

M.

Attachment Size
trunk_textstyle_cpp_CTDoncancel.patch 655 bytes

Comments