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:
authorCampbell Barton <ideasman42@gmail.com>2020-08-05 09:48:20 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-08-05 09:48:20 +0300
commit8e5a4e364530686765daff435047eacddbc1a374 (patch)
tree10d6b486bb19c49a370dae30e134b2d181b148b4 /source/blender/draw/intern
parentdb907ea888408f7700478ac581aab652df0c2855 (diff)
parent6be8b6af4006e088ac4a2cd8c1adc8f18c04035b (diff)
Merge branch 'blender-v2.90-release' into master
Diffstat (limited to 'source/blender/draw/intern')
-rw-r--r--source/blender/draw/intern/draw_manager_texture.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/draw/intern/draw_manager_texture.c b/source/blender/draw/intern/draw_manager_texture.c
index 77b0462303d..b94a6db3bad 100644
--- a/source/blender/draw/intern/draw_manager_texture.c
+++ b/source/blender/draw/intern/draw_manager_texture.c
@@ -61,6 +61,10 @@ static bool drw_texture_format_supports_framebuffer(eGPUTextureFormat format)
void drw_texture_set_parameters(GPUTexture *tex, DRWTextureFlag flags)
{
+ if (tex == NULL) {
+ return;
+ }
+
if (flags & DRW_TEX_MIPMAP) {
GPU_texture_mipmap_mode(tex, true, flags & DRW_TEX_FILTER);
GPU_texture_bind(tex, 0);
@@ -119,7 +123,6 @@ GPUTexture *DRW_texture_create_cube(int w,
{
GPUTexture *tex = GPU_texture_create_cube(w, format, fpixels, NULL);
drw_texture_set_parameters(tex, flags);
-
return tex;
}
@@ -128,7 +131,6 @@ GPUTexture *DRW_texture_create_cube_array(
{
GPUTexture *tex = GPU_texture_create_cube_array(w, d, format, fpixels, NULL);
drw_texture_set_parameters(tex, flags);
-
return tex;
}