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

A null pointer exception is triggered when Dolphin is quit from the dock.
Merge pull request #1755 from Armada651/master

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