Fixed crash when opening a file that doesn't exist

This commit is contained in:
Pierre Pronchery 2009-07-28 15:41:06 +00:00
parent 77556bc250
commit 19e45daf89

View File

@ -943,6 +943,7 @@ CppParser * cppparser_new(Cpp * cpp, CppParser * parent, char const * filename,
void cppparser_delete(CppParser * cp) void cppparser_delete(CppParser * cp)
{ {
string_delete(cp->queue_string); string_delete(cp->queue_string);
if(cp->parser != NULL)
parser_delete(cp->parser); parser_delete(cp->parser);
if(cp->subparser != NULL) if(cp->subparser != NULL)
cppparser_delete(cp->subparser); cppparser_delete(cp->subparser);