mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +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;
|
||||
}
|
||||
auto assets = scripting::engine->getAssets();
|
||||
if (assets == nullptr) {
|
||||
return 0;
|
||||
}
|
||||
auto sound = assets->get<audio::Sound>(name);
|
||||
if (sound == nullptr) {
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue