diff options
Diffstat (limited to 'source/blender/gpu/intern/gpu_framebuffer.cc')
-rw-r--r-- | source/blender/gpu/intern/gpu_framebuffer.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/gpu/intern/gpu_framebuffer.cc b/source/blender/gpu/intern/gpu_framebuffer.cc index 1293cc0953d..a6f7d43e563 100644 --- a/source/blender/gpu/intern/gpu_framebuffer.cc +++ b/source/blender/gpu/intern/gpu_framebuffer.cc @@ -495,7 +495,7 @@ void GPU_framebuffer_py_reference_set(GPUFrameBuffer *gpu_fb, void **py_ref) /** \} */ /* -------------------------------------------------------------------- */ -/** \name Frame-Buffer Stack +/** \name Frame-Buffer Stack * * Keeps track of frame-buffer binding operation to restore previously bound frame-buffers. * \{ */ @@ -609,7 +609,13 @@ GPUOffScreen *GPU_offscreen_create( } if ((depth && !ofs->depth) || !ofs->color) { - BLI_snprintf(err_out, 256, "GPUTexture: Texture allocation failed."); + const char error[] = "GPUTexture: Texture allocation failed."; + if (err_out) { + BLI_snprintf(err_out, 256, error); + } + else { + fprintf(stderr, error); + } GPU_offscreen_free(ofs); return nullptr; } |