Skip to content

Commit 4bcd8fc

Browse files
bodymovinbodymovin
andcommitted
fix: crash on script dispose (#11542) e86db167ed
Co-authored-by: hernan <hernan@rive.app>
1 parent 01e1500 commit 4bcd8fc

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.rive_head

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0eadaaea4797dfb4e6887ba05dd12774c3a7af97
1+
e86db167edbb949225333e31aa06915a29dfc67e

src/scripted/scripted_object.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,12 @@ void ScriptedObject::scriptDispose()
361361
{
362362
disposeScriptInputs();
363363

364+
#ifdef WITH_RIVE_TOOLS
365+
if (!hasValidVM())
366+
{
367+
return;
368+
}
369+
#endif
364370
if (m_state != nullptr)
365371
{
366372
lua_unref(m_state, m_self);

0 commit comments

Comments
 (0)