Fixes mediaplayer crashes on OSX
authortom <tom@flavoursys.com>
Fri, 24 Jan 2014 10:54:43 +0000 (11:54 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 24 Jan 2014 12:33:01 +0000 (13:33 +0100)
commitd26fcf043db5afba9c38653531794b6cf8f13e54
tree3525bf1a83c9fecf4065a65a6c6a6b02651d0996
parent819f30df336ec58ec487f19919ade198d016826d
Fixes mediaplayer crashes on OSX

Fixes the "libqavfmediaplayer.dylib 0x0000000110fa7c8c -[AVFMediaPlayerSessionObserver unloadMedia]" crash on Macs.
The problem was: writing to memory that had already been released. If not sure, one should always check if the objects exist before deleting it.

Solution tested on OSX 10.7, 10.8, 10.9

[ChangeLog][qtmultimedia][avfmediaplayersession]

Task-number: QTBUG-34213
Change-Id: Iac108711851c348e96e73542b4e71653007eeb54
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
src/plugins/avfoundation/mediaplayer/avfmediaplayersession.mm