Mercurial > hg > svcore
comparison data/model/Model.cpp @ 1018:4a2c150ecd67
Avoid crash when setting alignment to 0
author | Chris Cannam |
---|---|
date | Thu, 20 Nov 2014 16:18:31 +0000 |
parents | 4b9fc70a37d5 |
children | cc27f35aa75c |
comparison
equal
deleted
inserted
replaced
1017:216c4a06a462 | 1018:4a2c150ecd67 |
---|---|
83 { | 83 { |
84 if (m_alignment) { | 84 if (m_alignment) { |
85 m_alignment->aboutToDelete(); | 85 m_alignment->aboutToDelete(); |
86 delete m_alignment; | 86 delete m_alignment; |
87 } | 87 } |
88 | |
88 m_alignment = alignment; | 89 m_alignment = alignment; |
89 connect(m_alignment, SIGNAL(completionChanged()), | 90 |
90 this, SIGNAL(alignmentCompletionChanged())); | 91 if (m_alignment) { |
92 connect(m_alignment, SIGNAL(completionChanged()), | |
93 this, SIGNAL(alignmentCompletionChanged())); | |
94 } | |
91 } | 95 } |
92 | 96 |
93 const AlignmentModel * | 97 const AlignmentModel * |
94 Model::getAlignment() const | 98 Model::getAlignment() const |
95 { | 99 { |