mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Fix GridMap scenario crash when outside tree
Fixes GridMap scenario crash when outside tree.
This commit is contained in:
parent
b7b3a1a78a
commit
db6a22cb59
1 changed files with 4 additions and 1 deletions
|
|
@ -83,7 +83,10 @@ bool GridMap::_set(const StringName &p_name, const Variant &p_value) {
|
|||
|
||||
Array meshes = p_value;
|
||||
|
||||
const RID scenario = get_world_3d()->get_scenario();
|
||||
RID scenario;
|
||||
if (is_inside_tree()) {
|
||||
scenario = get_world_3d()->get_scenario();
|
||||
}
|
||||
|
||||
for (int i = 0; i < meshes.size(); i++) {
|
||||
BakedMesh bm;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue