Commits

Anonymous committed c4fbb68

Quickfix: moved removeItem ahead of all return points to avoid eternal loop

Comments (0)

Files changed (1)

src/scxml/ScXMLEventTarget.cpp

 void
 ScXMLEventTarget::unregisterEventTarget(ScXMLEventTarget * target, const char * sessionid)
 {
+  // FIXME This was done at the end of the function, but we have multiple exit points so target was sometimes
+  // not removed causing an endless loop.
+  ScXMLEventTarget::PImpl::targets.removeItem(target);
+
   const SbName targettypename(target->getEventTargetType());
   const SbName targetnamename(target->getEventTargetName());
   SbName targetsessionid(SbName::empty());
     ScXMLP::unlock();
     return;
   }
-
-  ScXMLEventTarget::PImpl::targets.removeItem(target);
   ScXMLP::unlock();
 }