mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-18 10:59:18 -06:00
Fix crash in planets sonification when no planets have been added
This commit is contained in:
@@ -666,6 +666,11 @@ bool PlanetsSonification::updateData(const Camera* camera, int planetIndex,
|
||||
}
|
||||
|
||||
void PlanetsSonification::sendData(int planetIndex) {
|
||||
if (_planets.empty()) {
|
||||
LWARNING("No planets have been added to the sonification");
|
||||
return;
|
||||
}
|
||||
|
||||
if (planetIndex < 0 || planetIndex > _planets.size() - 1) {
|
||||
LWARNING(std::format("Planet list does not include index {}", planetIndex));
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user