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
This commit is contained in:
parent
93f3bd545b
commit
ec2425ad5f
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user