Fix crash editing anisotropic filter preference from background mode
This commit is contained in:
parent
9622dace3e
commit
d2f47017b9
|
@ -177,7 +177,7 @@ void GPU_render_step()
|
|||
/** \name Backend selection
|
||||
* \{ */
|
||||
|
||||
static GPUBackend *g_backend;
|
||||
static GPUBackend *g_backend = nullptr;
|
||||
|
||||
bool GPU_backend_supported(eGPUBackendType type)
|
||||
{
|
||||
|
|
|
@ -702,7 +702,11 @@ void GPU_texture_get_mipmap_size(GPUTexture *tex, int lvl, int *r_size)
|
|||
|
||||
void GPU_samplers_update()
|
||||
{
|
||||
GPUBackend::get()->samplers_update();
|
||||
/* Backend may not exist when we are updating preferences from background mode. */
|
||||
GPUBackend *backend = GPUBackend::get();
|
||||
if (backend) {
|
||||
backend->samplers_update();
|
||||
}
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
|
Loading…
Reference in New Issue