From 2204c097aa18ce1f9c20530c1759ec9191bc229a Mon Sep 17 00:00:00 2001 From: "wagic.jeck" Date: Tue, 17 Nov 2009 23:05:24 +0000 Subject: [PATCH] Jeck - Fixed a debug-mode crash. * Crash was caused by null pointer dereference after card ID conflict deletes tempCard. --- projects/mtg/src/MTGDeck.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/mtg/src/MTGDeck.cpp b/projects/mtg/src/MTGDeck.cpp index 4a4acbeb4..80cc96c29 100644 --- a/projects/mtg/src/MTGDeck.cpp +++ b/projects/mtg/src/MTGDeck.cpp @@ -298,7 +298,7 @@ int MTGAllCards::readConfLine(std::ifstream &file, int set_id){ case 0: if (s[0] == '['){ #if defined (_DEBUG) - if (!committed){ + if (tempCard && !committed){ OutputDebugString("MTGDECK: Card not committed before creating new one, Memory leak risk\n "); OutputDebugString(tempCard->getName().c_str()); OutputDebugString("\n");