summaryrefslogtreecommitdiffstats
path: root/platform/javascript/audio_driver_javascript.cpp
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2024-05-02 15:06:07 -0300
committerGeorge Marques <george@gmarqu.es>2024-05-02 15:09:22 -0300
commit22236380c033a1d441d9b35b4bc1529218d4e39d (patch)
tree8a380cf8d4b9b1af0a2330a03532ec1b9b68d874 /platform/javascript/audio_driver_javascript.cpp
parent06d105e268ace265809ae3fac2f17ccea9ff88dd (diff)
downloadredot-engine-22236380c033a1d441d9b35b4bc1529218d4e39d.tar.gz
GDScript: Initialize static variables with defaults in-editor
When the script is not marked as `@tool` the static constructor is not called and thus the variables contain `null` by default. But since some validated operations requires a valid value, this would cause a crash. This commit solves this by initializing the static variables with a default value based on their types in the editor, when they are not marked as `@tool`, so if some `@tool` script access them, they will have a valid typed value, avoiding the crash.
Diffstat (limited to 'platform/javascript/audio_driver_javascript.cpp')
0 files changed, 0 insertions, 0 deletions