Fix SEGV on CP export with no model