delay deleting save buttons, to prevent possible crash later
This commit is contained in:
parent
4aaf3b852e
commit
659c3677aa
@ -517,9 +517,7 @@ void SearchView::NotifySaveListChanged(SearchModel * sender)
|
||||
for(i = 0; i < saveButtons.size(); i++)
|
||||
{
|
||||
RemoveComponent(saveButtons[i]);
|
||||
delete saveButtons[i];
|
||||
}
|
||||
saveButtons.clear();
|
||||
if(!sender->GetSavesLoaded())
|
||||
{
|
||||
nextButton->Enabled = false;
|
||||
@ -574,6 +572,11 @@ void SearchView::NotifySaveListChanged(SearchModel * sender)
|
||||
delete errorLabel;
|
||||
errorLabel = NULL;
|
||||
}
|
||||
for(i = 0; i < saveButtons.size(); i++)
|
||||
{
|
||||
delete saveButtons[i];
|
||||
}
|
||||
saveButtons.clear();
|
||||
|
||||
buttonYOffset = 28;
|
||||
buttonXOffset = buttonPadding;
|
||||
|
@ -24,7 +24,7 @@ public:
|
||||
std::string GetError();
|
||||
std::string GetStatus();
|
||||
void Poll();
|
||||
Task() : listener(NULL) { progress = 0; }
|
||||
Task() : listener(NULL) { progress = 0; thProgress = 0; }
|
||||
virtual ~Task();
|
||||
protected:
|
||||
int progress;
|
||||
|
Reference in New Issue
Block a user