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