You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-14 13:41:12 +00:00
Fix GridMap scenario crash when outside tree
Fixes GridMap scenario crash when outside tree.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user