woops forgot to check for nullptr

pull/241/head
DJLevel3 2024-04-18 12:50:12 -06:00 zatwierdzone przez James H Ball
rodzic 1414186011
commit bc908d12c9
1 zmienionych plików z 7 dodań i 5 usunięć

Wyświetl plik

@ -901,13 +901,15 @@ void OscirenderAudioProcessor::setStateInformation(const void* data, int sizeInB
} }
} }
changeCurrentFile(xml->getIntAttribute("currentFile", -1)); changeCurrentFile(xml->getIntAttribute("currentFile", -1));
{
// Get .gpla animation stuff // Get .gpla animation stuff
auto lineArtXml = xml->getChildByName("gpla"); auto lineArtXml = xml->getChildByName("gpla");
animateLineArt = lineArtXml->getBoolAttribute("animateLineArt", false); if (lineArtXml != nullptr) {
syncMIDIAnimation = lineArtXml->getBoolAttribute("syncMIDIAnimation", false); animateLineArt = lineArtXml->getBoolAttribute("animateLineArt", false);
animationRate = lineArtXml->getDoubleAttribute("animationRate", 8.); syncMIDIAnimation = lineArtXml->getBoolAttribute("syncMIDIAnimation", false);
animationOffset = lineArtXml->getIntAttribute("animationOffset", 0); animationRate = lineArtXml->getDoubleAttribute("animationRate", 8.);
animationOffset = lineArtXml->getIntAttribute("animationOffset", 0);
}
broadcaster.sendChangeMessage(); broadcaster.sendChangeMessage();
prevMidiEnabled = !midiEnabled->getBoolValue(); prevMidiEnabled = !midiEnabled->getBoolValue();