(svn r13133) -Codechange: Add a base class (descending from Window) for all new windows that are going to require a ResetObjectToPlace to be performed on closing.
This will allow to free the said window only once, and not twice otherwise
This commit is contained in:
@@ -2350,3 +2350,13 @@ void RelocateAllWindows(int neww, int newh)
|
||||
w->top = top;
|
||||
}
|
||||
}
|
||||
|
||||
/** Destructor of the base class PickerWindowBase
|
||||
* Main utility is to stop the base Window destructor from triggering
|
||||
* a free while the child will already be free, in this case by the ResetObjectToPlace().
|
||||
*/
|
||||
PickerWindowBase::~PickerWindowBase()
|
||||
{
|
||||
this->window_class = WC_INVALID; // stop the ancestor from freeing the already (to be) child
|
||||
ResetObjectToPlace();
|
||||
}
|
||||
|
Reference in New Issue
Block a user