File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -517,12 +517,15 @@ void ReadContext::clearOrphanedConnectors()
517
517
std::set<LinkedObjects*> deletedLinks;
518
518
519
519
auto deleteConnectors = [&deletedLinks](std::shared_ptr<ConnectorInfoReader> c) {
520
- EngravingItem* conn = c->releaseConnector ();
520
+ EngravingItem* conn = c ? c->releaseConnector () : nullptr ;
521
+ if (!conn) {
522
+ return ;
523
+ }
521
524
522
525
LinkedObjects* links = conn->links ();
523
526
bool linksWillBeDeleted = links && links->size () == 1 ;
524
527
525
- if (conn && !conn->isTuplet ()) { // tuplets are added to score even when not finished
528
+ if (!conn->isTuplet ()) { // tuplets are added to score even when not finished
526
529
if (linksWillBeDeleted) {
527
530
deletedLinks.insert (links);
528
531
}
Original file line number Diff line number Diff line change @@ -517,12 +517,15 @@ void ReadContext::clearOrphanedConnectors()
517
517
std::set<LinkedObjects*> deletedLinks;
518
518
519
519
auto deleteConnectors = [&deletedLinks](std::shared_ptr<ConnectorInfoReader> c) {
520
- EngravingItem* conn = c->releaseConnector ();
520
+ EngravingItem* conn = c ? c->releaseConnector () : nullptr ;
521
+ if (!conn) {
522
+ return ;
523
+ }
521
524
522
525
LinkedObjects* links = conn->links ();
523
526
bool linksWillBeDeleted = links && links->size () == 1 ;
524
527
525
- if (conn && !conn->isTuplet ()) { // tuplets are added to score even when not finished
528
+ if (!conn->isTuplet ()) { // tuplets are added to score even when not finished
526
529
if (linksWillBeDeleted) {
527
530
deletedLinks.insert (links);
528
531
}
You can’t perform that action at this time.
0 commit comments