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

• Jul 7, 2011 - 21:31
Type
Functional
Severity
S2 - Critical
Status
closed
Project

Setup: rev. 4493; Ubuntu 11.04, Qt SDK 1.1 (Qt lib 4.7.3)

Steps:

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

Result: the programme crashes.

Note:

Happens in file mscore/mscore/mscore/editstyle.cpp, line 129 function EditStyle::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_editstyle_cpp_CTDoncancel.patch 654 bytes

Comments