Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/draw')
-rw-r--r--source/blender/draw/intern/draw_fluid.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_fluid.c b/source/blender/draw/intern/draw_fluid.c
index af14f11e6e9..809512bd7dd 100644
--- a/source/blender/draw/intern/draw_fluid.c
+++ b/source/blender/draw/intern/draw_fluid.c
@@ -183,6 +183,10 @@ static GPUTexture *create_volume_texture(const int dim[3],
GPUTexture *tex = NULL;
int final_dim[3] = {UNPACK3(dim)};
+ if (data == NULL) {
+ return NULL;
+ }
+
while (1) {
tex = GPU_texture_create_3d("volume", UNPACK3(final_dim), 1, format, NULL);
@@ -292,6 +296,10 @@ static GPUTexture *create_density_texture(FluidDomainSettings *fds, int highres)
data = manta_smoke_get_density(fds->fluid);
}
+ if (data == NULL) {
+ return NULL;
+ }
+
GPUTexture *tex = create_volume_texture(dim, GPU_R8, data);
swizzle_texture_channel_single(tex);
return tex;