mirror of
https://github.com/Relintai/voxelman.git
synced 2025-02-10 16:20:10 +01:00
Crash fix.
This commit is contained in:
parent
34e0252066
commit
249e4e5f81
@ -58,7 +58,10 @@ void VoxelmanLibrary::set_voxel_surfaces(const Vector<Variant> &effects) {
|
|||||||
_voxel_surfaces.clear();
|
_voxel_surfaces.clear();
|
||||||
for (int i = 0; i < effects.size(); i++) {
|
for (int i = 0; i < effects.size(); i++) {
|
||||||
Ref<VoxelSurface> surface = Ref<VoxelSurface>(effects[i]);
|
Ref<VoxelSurface> surface = Ref<VoxelSurface>(effects[i]);
|
||||||
surface->set_library(this);
|
|
||||||
|
if (surface.is_valid())
|
||||||
|
surface->set_library(this);
|
||||||
|
|
||||||
_voxel_surfaces.push_back(surface);
|
_voxel_surfaces.push_back(surface);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user