Kaydet (Commit) 9e59f241 authored tarafından Michael Meeks's avatar Michael Meeks Kaydeden (comit) Andras Timar

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/17931Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst d7180aea
...@@ -101,12 +101,16 @@ void MediaFloater::ToggleFloatingMode() ...@@ -101,12 +101,16 @@ void MediaFloater::ToggleFloatingMode()
{ {
::avmedia::MediaItem aRestoreItem; ::avmedia::MediaItem aRestoreItem;
if (mpMediaWindow)
mpMediaWindow->updateMediaItem( aRestoreItem ); mpMediaWindow->updateMediaItem( aRestoreItem );
delete mpMediaWindow; delete mpMediaWindow;
mpMediaWindow = NULL; mpMediaWindow = NULL;
SfxDockingWindow::ToggleFloatingMode(); SfxDockingWindow::ToggleFloatingMode();
if (isDisposed())
return;
mpMediaWindow = new MediaWindow( this, true ); mpMediaWindow = new MediaWindow( this, true );
mpMediaWindow->setPosSize( Rectangle( Point(), GetOutputSizePixel() ) ); mpMediaWindow->setPosSize( Rectangle( Point(), GetOutputSizePixel() ) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment