canvas::NasalWidget: don't call unsafe method in destructor

Calling a virtual method in a destructor has undefined behaviour.
Furthermore passing 'this' to nasal from within the destructor
is not safe. 'onRemove' is called for widgets within layouts
on destruction anyhow, so no need to call it here again. If widgets
are arranged manually without any layout 'onRemoved' should be
called upon removing them from a dialog.
This commit is contained in:
Thomas Geymayer
2017-12-01 08:14:44 +01:00
parent 4f63c3f8a8
commit 15d5c878f3

View File

@@ -45,7 +45,7 @@ namespace canvas
//----------------------------------------------------------------------------
NasalWidget::~NasalWidget()
{
onRemove();
}
//----------------------------------------------------------------------------