summaryrefslogtreecommitdiff
path: root/avmedia
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-08-22 19:07:12 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-08-22 19:11:58 +0100
commit1ce2375b17912622e6db4c2c81afa24527a0104b (patch)
treee622dd6fcc7a64eb1c67405f883866165efcc35a /avmedia
parent26f3a6470336644988de1f8a76d982dae4de67ae (diff)
tdf#93188 - avoid crash in media player.
ToggleFloatingMode can be run during dispose, and should handle that, thanks to Maxim Monastirsky for the analysis. Change-Id: I72c5aff9b75fa2c1b6795e239370244dafdafae2
Diffstat (limited to 'avmedia')
-rw-r--r--avmedia/source/framework/mediaplayer.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/avmedia/source/framework/mediaplayer.cxx b/avmedia/source/framework/mediaplayer.cxx
index 28adf1959c8e..b9c2b672d387 100644
--- a/avmedia/source/framework/mediaplayer.cxx
+++ b/avmedia/source/framework/mediaplayer.cxx
@@ -101,12 +101,16 @@ void MediaFloater::ToggleFloatingMode()
{
::avmedia::MediaItem aRestoreItem;
- mpMediaWindow->updateMediaItem( aRestoreItem );
+ if (mpMediaWindow)
+ mpMediaWindow->updateMediaItem( aRestoreItem );
delete mpMediaWindow;
mpMediaWindow = NULL;
SfxDockingWindow::ToggleFloatingMode();
+ if (isDisposed())
+ return;
+
mpMediaWindow = new MediaWindow( this, true );
mpMediaWindow->setPosSize( Rectangle( Point(), GetOutputSizePixel() ) );