Fixed crash when trying to make a CDockWidget floating in non-opaque mode if the CDockWidget is not floatable

This commit is contained in:
Uwe Kindler 2020-04-27 07:54:43 +02:00
parent 52a64350e6
commit 842d417e8d

View File

@ -299,19 +299,17 @@ void CFloatingDragPreview::finishDragging()
else
{
CDockWidget* DockWidget = qobject_cast<CDockWidget*>(d->Content);
CDockAreaWidget* DockArea = qobject_cast<CDockAreaWidget*>(d->Content);
CFloatingDockContainer* FloatingWidget = nullptr;
if (DockWidget && DockWidget->features().testFlag(CDockWidget::DockWidgetFloatable))
{
FloatingWidget = new CFloatingDockContainer(DockWidget);
}
else
else if (DockArea && DockArea->features().testFlag(CDockWidget::DockWidgetFloatable))
{
CDockAreaWidget* DockArea = qobject_cast<CDockAreaWidget*>(d->Content);
if (DockArea->features().testFlag(CDockWidget::DockWidgetFloatable))
{
FloatingWidget = new CFloatingDockContainer(DockArea);
}
FloatingWidget = new CFloatingDockContainer(DockArea);
}
if (FloatingWidget)