forked from pool/rosegarden
Fix crash OBS-URL: https://build.opensuse.org/request/show/435595 OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/rosegarden?expand=0&rev=70
14 lines
444 B
Diff
14 lines
444 B
Diff
--- a/src/document/RosegardenDocument.cpp
|
|
+++ b/src/document/RosegardenDocument.cpp
|
|
@@ -947,6 +947,10 @@
|
|
|
|
Instrument *instrument = m_studio.getInstrumentById(instrumentId);
|
|
|
|
+ // If this instrument doesn't exist, try the next track.
|
|
+ if (!instrument)
|
|
+ continue;
|
|
+
|
|
// If this isn't a MIDI instrument, try the next track.
|
|
if (instrument->getType() != Instrument::Midi)
|
|
continue;
|