void DCEditScriptFolder::attach(DCCell *cell)
{
deattach();
- d_attacher = DCCodeEditorScriptManager::createCustomScriptAttacher(this, cell);
+ if (cell)
+ d_attacher = DCCodeEditorScriptManager::createCustomScriptAttacher(this, cell);
}
void DCEditScriptFolder::attach(DCCellCode *cellCode)
{
deattach();
- d_attacher = DCCodeEditorScriptManager::createCellCodeScriptAttacher(this, cellCode);
+ if (cellCode)
+ d_attacher = DCCodeEditorScriptManager::createCellCodeScriptAttacher(this, cellCode);
}
void DCEditScriptFolder::deattach()