fix #40016: Crash when closing score

This commit is contained in:
ws 2014-12-04 15:57:40 +01:00
parent f3071ac9d0
commit a68454ece6
4 changed files with 2 additions and 9 deletions

View file

@ -46,8 +46,6 @@ DurationElement::DurationElement(const DurationElement& e)
DurationElement::~DurationElement()
{
if (tuplet() && !tuplet()->elements().isEmpty() && tuplet()->elements().front() == this)
delete tuplet();
}
//---------------------------------------------------------

View file

@ -88,7 +88,7 @@ public:
Segment* _prev;
mutable bool empty; // cached value
mutable bool _written; // used for write()
mutable bool _written { false }; // used for write()
Type _segmentType { Type::Invalid };
int _tick;

View file

@ -72,11 +72,6 @@ Tuplet::Tuplet(const Tuplet& t)
Tuplet::~Tuplet()
{
//
// delete all references
//
foreach(DurationElement* e, _elements)
e->setTuplet(0);
delete _number;
}

View file

@ -91,7 +91,7 @@ class Tuplet : public DurationElement {
void setRatio(const Fraction& r) { _ratio = r; }
const QList<DurationElement*>& elements() const { return _elements; }
void clear() { _elements.clear(); }
void clear() { _elements.clear(); }
virtual void layout();
Text* number() const { return _number; }