fix crash on undo. caused by reference to deleted camera