Eevee: Fix conditional statement depending on unitialized value
authorDalai Felinto <dfelinto@gmail.com>
Wed, 30 Aug 2017 09:09:07 +0000 (11:09 +0200)
committerDalai Felinto <dfelinto@gmail.com>
Wed, 30 Aug 2017 15:00:00 +0000 (17:00 +0200)
commit698bae05aa6935d2f06b307c9817f979c5ace29a
tree8a3fbe217acdc7ce4ad1d50ce2e9bc63304a4764
parent510651ed7271320c566c57d2fbb6979c9421348e
Eevee: Fix conditional statement depending on unitialized value

Basically since g_data was malloc'ed (instead of calloc'ed)
g_data->minzbuffer was never initialized.

So when running DRW_framebuffer_init after EEVEE_effects_init, the test
to *g_data->minzbuffer would lead to unpredictable results.

This was caught by valgrind, reported by Sergey Sharybin.
source/blender/draw/engines/eevee/eevee_engine.c