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:
authorMike Erwin <significant.bit@gmail.com>2017-04-21 22:51:08 +0300
committerMike Erwin <significant.bit@gmail.com>2017-04-21 22:51:08 +0300
commit12261aa047f41eb7f0d29c3ba25d933c3f67e7fc (patch)
treec8bba0f9870439bbe2c5b07da4d49582197c8983
parentdcda9b41365eea4b725d941f34179b4e1da3bb8d (diff)
fix unitizialized use warning
The code would only use 'type' uninitialized in error conditions, but it's still better to avoid that. caught by clang
-rw-r--r--source/blender/draw/intern/draw_manager.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index 1f0bf0cf79c..66e44edc63d 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -1319,6 +1319,7 @@ void DRW_framebuffer_read_data(int x, int y, int w, int h, int channels, int slo
case 4: type = GL_RGBA; break;
default:
BLI_assert(false && "wrong number of read channels");
+ return;
}
glReadBuffer(GL_COLOR_ATTACHMENT0 + slot);
glReadPixels(x, y, w, h, type, GL_FLOAT, data);