fix fatal error on audio.play_sound in headless-mode
This commit is contained in:
@@ -31,6 +31,9 @@ inline audio::speakerid_t play_sound(
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
auto assets = scripting::engine->getAssets();
|
auto assets = scripting::engine->getAssets();
|
||||||
|
if (assets == nullptr) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
auto sound = assets->get<audio::Sound>(name);
|
auto sound = assets->get<audio::Sound>(name);
|
||||||
if (sound == nullptr) {
|
if (sound == nullptr) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user