Widgets/BaseWidget: Fix warning in release

This commit is contained in:
SirLynix
2023-08-24 08:42:37 +02:00
parent ad738a2803
commit 9579eba43d

View File

@@ -444,11 +444,8 @@ namespace Nz
void BaseWidget::SetParent(BaseWidget* widget) void BaseWidget::SetParent(BaseWidget* widget)
{ {
Canvas* oldCanvas = m_canvas;
Canvas* newCanvas = widget->GetCanvas();
// Changing a widget canvas is a problem because of the canvas entities // Changing a widget canvas is a problem because of the canvas entities
NazaraAssert(oldCanvas == newCanvas, "Transferring a widget between canvas is not yet supported"); NazaraAssert(m_canvas == widget->GetCanvas(), "Transferring a widget between canvas is not yet supported");
Node::SetParent(widget); Node::SetParent(widget);
m_parentWidget = widget; m_parentWidget = widget;