[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - avmedia/source

Caolán McNamara caolanm at redhat.com
Tue Jun 7 13:31:18 UTC 2016


 avmedia/source/framework/mediaplayer.cxx |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 53d6094bd1337580dcd1c449f2bb696f03afb621
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jun 7 14:28:15 2016 +0100

    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
    (cherry picked from commit ec2425ad5fb39df5ad952b27d49e172fdd7ff00d)

diff --git a/avmedia/source/framework/mediaplayer.cxx b/avmedia/source/framework/mediaplayer.cxx
index 638b7b9..4b3a9e0 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;


More information about the Libreoffice-commits mailing list