diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-06-07 14:28:15 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-06-07 14:29:45 +0100 |
commit | ec2425ad5fb39df5ad952b27d49e172fdd7ff00d (patch) | |
tree | 711f381a3e7c63958ee86afeba8f5b780259c66b /avmedia | |
parent | 93f3bd545b65a4df1ed04118f696a85a0e50c423 (diff) |
Resolves: tdf#100258 crash on disposing media player
SfxDockingWindow::dispose() will call SetFloatingMode false
its floating, which recreates the mpMediaWindow and so
the assert occurs about living children.
So toggle out of floating mode before deleting mpMediaWindow
to avoid that
Change-Id: I0b1cae149261fa43611b9f9a39465ce718e33484
Diffstat (limited to 'avmedia')
-rw-r--r-- | avmedia/source/framework/mediaplayer.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/avmedia/source/framework/mediaplayer.cxx b/avmedia/source/framework/mediaplayer.cxx index 638b7b9dabeb..4b3a9e016c7b 100644 --- a/avmedia/source/framework/mediaplayer.cxx +++ b/avmedia/source/framework/mediaplayer.cxx @@ -67,15 +67,18 @@ MediaFloater::~MediaFloater() disposeOnce(); } - void MediaFloater::dispose() { + if (IsFloatingMode()) + { + Show(false, ShowFlags::NoFocusChange); + SetFloatingMode(false); + } delete mpMediaWindow; mpMediaWindow = nullptr; SfxDockingWindow::dispose(); } - void MediaFloater::Resize() { SfxDockingWindow::Resize(); @@ -84,7 +87,6 @@ void MediaFloater::Resize() mpMediaWindow->setPosSize( Rectangle( Point(), GetOutputSizePixel() ) ); } - void MediaFloater::ToggleFloatingMode() { ::avmedia::MediaItem aRestoreItem; |