Initialize CLOG to fix crashing unit tests
Initialize CLOG in the blendfile-loading unit test superclass. Since rB8683d4e88f2e CLOG is used by more areas in Blender, and without initialisation it crashes.
This commit is contained in:
@@ -34,6 +34,7 @@ set(INC
|
||||
../sequencer
|
||||
../windowmanager
|
||||
../../../intern/guardedalloc
|
||||
../../../intern/clog
|
||||
|
||||
# for writefile.c: dna_type_offsets.h
|
||||
${CMAKE_BINARY_DIR}/source/blender/makesdna/intern
|
||||
|
||||
@@ -48,6 +48,8 @@
|
||||
#include "WM_api.h"
|
||||
#include "wm.h"
|
||||
|
||||
#include "CLG_log.h"
|
||||
|
||||
BlendfileLoadingBaseTest::~BlendfileLoadingBaseTest()
|
||||
{
|
||||
}
|
||||
@@ -58,12 +60,14 @@ void BlendfileLoadingBaseTest::SetUpTestCase()
|
||||
|
||||
/* Minimal code to make loading a blendfile and constructing a depsgraph not crash, copied from
|
||||
* main() in creator.c. */
|
||||
CLG_init();
|
||||
BLI_threadapi_init();
|
||||
|
||||
DNA_sdna_current_init();
|
||||
BKE_blender_globals_init();
|
||||
|
||||
BKE_idtype_init();
|
||||
BKE_appdir_init();
|
||||
IMB_init();
|
||||
BKE_images_init();
|
||||
BKE_modifier_init();
|
||||
@@ -100,6 +104,8 @@ void BlendfileLoadingBaseTest::TearDownTestCase()
|
||||
|
||||
BKE_tempdir_session_purge();
|
||||
|
||||
CLG_exit();
|
||||
|
||||
testing::Test::TearDownTestCase();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user