Commit 91b8194b9526fe968f55aa25786d7857558adfa2

  • avatar
  • Sergey 'Jin' Bostandzhyan <jin @deve…per.digitalstrom.org>
  • Tue Sep 07 11:30:18 CEST 2010
  • Tree SHA1: a1ca905
  • Parent SHA1: 2f39c6e (Merge commit 'refs/merge-requests/163' of git://gitorious.digitalstrom.org/dss/dss-mainline into integration)
  • raw diff | raw patch
Fixed assert that was seen during the tests

The cleanup code in the ScriptContextWrapper object was expecting an
existing property node, which is not the case in the test environment.
While the constructor was handling this correctly, the check in the
destructor was not made.

Fixed by adding the check to the destructor ScriptContextWrapper
destructor.
core/eventinterpreterplugins.cpp
(3 / 1)
  
121121 }
122122
123123 ~ScriptContextWrapper() {
124 m_pPropertyNode->getParentNode()->removeChild(m_pPropertyNode);
124 if ((m_pPropertyNode != NULL) && (m_pPropertyNode->getParentNode() != NULL)) {
125 m_pPropertyNode->getParentNode()->removeChild(m_pPropertyNode);
126 }
125127 }
126128
127129 boost::shared_ptr<ScriptContext> get() {