Fix an race condition in the auto test.
Deleting the page in the wizard without removing it first leads to a crash when the wizard tries to access a deleted page. Reviewed-by: jasplin (cherry picked from commit 3bff1637cd49617d334c1be63c20e008fac93be1)
This commit is contained in:
parent
e27baeff28
commit
e37d9e9691
@ -1770,8 +1770,11 @@ public:
|
|||||||
|
|
||||||
~TestWizard()
|
~TestWizard()
|
||||||
{
|
{
|
||||||
foreach (int id, pageIds)
|
foreach (int id, pageIds) {
|
||||||
delete page(id);
|
QWizardPage *page_to_delete = page(id);
|
||||||
|
removePage(id);
|
||||||
|
delete page_to_delete;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void applyOperations(const QList<Operation *> &operations)
|
void applyOperations(const QList<Operation *> &operations)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user