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
This commit is contained in:
Mike Erwin 2017-04-21 15:51:08 -04:00
parent dcda9b4136
commit 12261aa047
1 changed files with 1 additions and 0 deletions

View File

@ -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);