Skip to content

Commit

Permalink
Fix the log crash bugs by ensuring we don't try to read deleted memory
Browse files Browse the repository at this point in the history
  • Loading branch information
nixeagle committed Feb 11, 2012
1 parent b927bca commit 12070eb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Shared/config.h 100644 → 100755
@@ -1,6 +1,6 @@
#ifndef CONFIG_H
#define CONFIG_H

#define VERSION QString("1.0.53")
#define VERSION QString("1.0.54a2")

#endif // CONFIG_H
3 changes: 3 additions & 0 deletions src/Teambuilder/basebattlewindow.cpp 100644 → 100755
Expand Up @@ -307,6 +307,9 @@ QString BaseBattleWindow::name(int spot) const

void BaseBattleWindow::checkAndSaveLog()
{
if(reinterpret_cast<size_t>(log) == 0) {
return; // log was already deleted from a prior call.
}
log->pushList(test->getLog()->getLog());
log->pushHtml("</body>");
replay->setBinary(replayData.data);
Expand Down
1 change: 1 addition & 0 deletions src/Teambuilder/battlewindow.cpp 100644 → 100755
Expand Up @@ -422,6 +422,7 @@ void BattleWindow::disable()
disconnect(myclose);
connect(myclose, SIGNAL(clicked()), this, SLOT(deleteLater()));
BaseBattleWindow::disable();
setEnabled(true);
}

void BattleWindow::disableAll()
Expand Down

0 comments on commit 12070eb

Please sign in to comment.