C++ observer?

At what point in the load cycle are you getting a 0 pointer ?

Ie, after the extensions load, SketchUp goes through any attached AppObservers and polls them for an expectsStartupModelNotifications() callback that returns true and if so, then checks if they have either an onNewModel or onOpenModel callback and calls the appropriate one.

(If I remember correctly,) the point in time when the model reference is valid differs per platform (WIN vs MAC,) but on both at this time (when observers are polled as explained above) extensions can rely on the model having been loaded and/or initialized when their extension’s AppObserver callbacks get called.

I often have a pattern where both the new and open model callbacks call the same internal init method in an extension submodule.

Anyway … this pattern is the functional opposite of your previous topic on knowing when SketchUp is closing …