fix crash on mat creation after orm refactor
This commit is contained in:
@ -643,7 +643,7 @@ void EditorResourcePicker::drop_data_fw(const Point2 &p_point, const Variant &p_
|
||||
|
||||
if (at == "SpatialMaterial" && ClassDB::is_parent_class(dropped_resource->get_class(), "Texture")) {
|
||||
// Use existing resource if possible and only replace its data.
|
||||
Ref<Material3D> mat = edited_resource;
|
||||
Ref<SpatialMaterial> mat = edited_resource;
|
||||
if (mat.is_null()) {
|
||||
mat.instance();
|
||||
}
|
||||
|
||||
@ -637,9 +637,8 @@ private:
|
||||
RID indicators_instance;
|
||||
RID cursor_mesh;
|
||||
RID cursor_instance;
|
||||
Ref<Material3D> indicator_mat;
|
||||
Ref<SpatialMaterial> indicator_mat;
|
||||
Ref<ShaderMaterial> grid_mat[3];
|
||||
Ref<Material3D> cursor_material;
|
||||
|
||||
// Scene drag and drop support
|
||||
Spatial *preview_node;
|
||||
|
||||
Reference in New Issue
Block a user