CodeDocument issue.. setPositionMaintained()?


#1

I’m using the CodeDocument class to display some program code and I’m having problems when I exit my application. It keeps asserting in

void CodeDocument::Position::setPositionMaintained (const bool isMaintained)

on this line:

// If this happens, you may have deleted the document while there are Position objects that are still using it…
jassert (owner->positionsToMaintain.contains (this));
owner->positionsToMaintain.removeValue (this);

I don’t have any position objects(that I’m aware off!). I’m kind of at sea here? Any ideas? I can post the full app code, it’s pretty minimal. Must I subclass CodeDocument? As far as I can tell I’m following the Demo pretty closely. I’ll keep looking but if anyone has any suggestions I’d very much appreciate it. Thanks.