Fix T80943: return early when field to visualize is NULL

This commit is contained in:
Jacques Lucke 2020-09-22 10:42:52 +02:00
parent ee89106ac1
commit 222ed9f781
Notes: blender-bot 2023-02-14 08:24:03 +01:00
Referenced by issue #80943, Blender 2.91 crash when you select Grid Display > 'Obstacle Levelset' or 'Outflow Levelset' in Fluid Simulation
1 changed files with 4 additions and 0 deletions

View File

@ -316,6 +316,10 @@ static GPUTexture *create_field_texture(FluidDomainSettings *fds, bool single_pr
return NULL;
}
if (field == NULL) {
return NULL;
}
GPUTexture *tex = create_volume_texture(fds->res, texture_format, data_format, field);
swizzle_texture_channel_single(tex);
return tex;