I think I found a Jucer bug, whilst shamelessly ripping it off
class ComponentUndoableAction : public UndoableAction
ComponentUndoableAction (ComponentType* const comp, ComponentLayout& layout_) : layout (layout_), componentIndex (layout_.indexOfComponent (comp))
[/code] It seems that the comp member doesn’t get set - and the assert doesn’t catch it because the incoming value masks it. Maybe there’s something else going on (beyond my ken), but in my ‘version’ I needed to set that.