1
1
forked from 0ad/0ad

Fixes hypothetical mem leak in network code (and an error in Cppcheck), patch by Riemer, fixes #2122

This was SVN commit r13980.
This commit is contained in:
historic_bruno 2013-10-10 23:46:42 +00:00
parent f6c9db33d6
commit a00e57df72

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2011 Wildfire Games.
/* Copyright (C) 2013 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -286,7 +286,11 @@ CFsmTransition* CFsm::AddTransition(
// Create new transition
CFsmTransition* pNewTransition = new CFsmTransition( state );
if ( !pNewTransition ) return NULL;
if ( !pNewTransition )
{
delete pEvent;
return NULL;
}
// Setup new transition
pNewTransition->SetEvent( pEvent );