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

Michael Meeks michael.meeks at collabora.com
Sat Aug 22 12:09:42 PDT 2015


 avmedia/source/framework/mediaplayer.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 444c76830b75528a8130484e24781333535200f3
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Sat Aug 22 19:07:12 2015 +0100

    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
    Reviewed-on: https://gerrit.libreoffice.org/17931
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/avmedia/source/framework/mediaplayer.cxx b/avmedia/source/framework/mediaplayer.cxx
index 28adf19..b9c2b67 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() ) );


More information about the Libreoffice-commits mailing list