[App] Fix segfault due to missing Py_Initialize in StringIDRefTest

The PyObject desctructor requires an initialized interpreter, otherwise
PyGILState_Ensure crashes.

Fixes #11878
This commit is contained in:
Stefan Brüns
2024-01-10 21:27:35 +01:00
committed by Chris Hennes
parent 1bf512be84
commit ffad094051

View File

@@ -1006,6 +1006,7 @@ TEST_F(StringIDRefTest, toBytes) // NOLINT
TEST_F(StringIDRefTest, getPyObject) // NOLINT
{
Py_Initialize();
// Arrange
auto ref = App::StringIDRef(createStringID());
auto empty = App::StringIDRef();