1
1

DRW: Volume: Fix crash in command line render caused by null textures

This was caused by the world volume shader needing placeholder textures
that were not available until cache populate begins.

Adding a check and creating on the fly fixes the issue.
This commit is contained in:
2022-07-21 16:41:41 +02:00
parent d431b1416b
commit ef5b435e8f

View File

@@ -89,6 +89,10 @@ void DRW_volume_free(void)
static GPUTexture *grid_default_texture(eGPUDefaultValue default_value)
{
if (g_data.dummy_one == nullptr) {
drw_volume_globals_init();
}
switch (default_value) {
case GPU_DEFAULT_0:
return g_data.dummy_zero;