Frame: Fix a crash-on-exit on Mac OS X.

A null pointer exception is triggered when Dolphin is quit from the dock.