mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-10 13:31:49 +00:00
fix fatal error on audio.play_sound in headless-mode
This commit is contained in:
parent
1f9b619392
commit
a74a4fcf53
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue