Fixed crash that happens after destroying Phonon::QT7::VideoWidget qtmovieview_crash_fix
authorandrew.w <andrew.w@sohovfx.com>
Wed, 13 Oct 2010 16:01:27 +0000 (12:01 -0400)
committerandrew.w <andrew.w@sohovfx.com>
Mon, 18 Oct 2010 15:13:56 +0000 (11:13 -0400)
commit6ef3af6685f064c4b2644f3297a84d05bc0fcd3c
tree961287e15b1f84b2c88a0bc4708b0e3bde979e6a
parentb317eb32c495cbedf5553de333ffdafbf3d75fc4
Fixed crash that happens after destroying Phonon::QT7::VideoWidget

QTMovieView needs to perform some cleanup in its own implementation of
viewWillMoveToWindow.  When SharedQTMovieView overrides the function
without calling QTMovieView's viewWillMoveToWindow, the cleanup is not
performed.

The cleanup involves removing itself as an observer from the
NSNotificationCenter.  If QTMovieView has been deallocated without
performing the cleanup, the NSNotificationCenter will continue to send
notifications to QTMovieView even though it have been deallocated, which
causes a crash.
src/3rdparty/phonon/qt7/videowidget.mm