Skip to content

Commit 2467cf7

Browse files
asuessenbachmtavenrath
authored andcommitted
[mdl] fix crash on shutdown of neuray by resetting everything.
Change-Id: I51ce3ef0ca1e4cb13e1f2bad7b76968609d25629 Reviewed-on: http://git-master/r/1259939 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Markus Tavenrath <[email protected]> Tested-by: Markus Tavenrath <[email protected]>
1 parent e4e34ab commit 2467cf7

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

dp/fx/mdl/src/MDLTokenizer.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,12 +246,15 @@ namespace dp
246246

247247
MDLTokenizer::~MDLTokenizer()
248248
{
249-
m_database.reset();
249+
// throw away everything before m_neuray is shut down
250250
m_mdlValueFactory.reset();
251251
m_mdlExpressionFactory.reset();
252252
m_mdlFactory.reset();
253-
m_mdlCompiler.reset(); // throw away before m_neuray is shut down
254-
m_neuray->shutdown();
253+
m_transaction->commit();
254+
m_transaction.reset();
255+
m_mdlCompiler.reset();
256+
m_database.reset();
257+
DP_VERIFY(m_neuray->shutdown() == 0);
255258
}
256259

257260
bool MDLTokenizer::checkDefaultField(std::string const& fieldName, mi::base::Handle<mi::neuraylib::IExpression const> const& expression)

0 commit comments

Comments
 (0)