]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - ftepp.c
Don't delete the ftepp prematurely
[xonotic/gmqcc.git] / ftepp.c
diff --git a/ftepp.c b/ftepp.c
index 6f2bb9316e9dc0578dfc1a0367e7ddfe082c5b83..b8fc9f4a5734eadd74e032a6de359f7126f5652e 100644 (file)
--- a/ftepp.c
+++ b/ftepp.c
@@ -1235,10 +1235,8 @@ bool ftepp_preprocess_file(const char *filename)
         con_out("failed to open file \"%s\"\n", filename);
         return false;
     }
-    if (!ftepp_preprocess(ftepp)) {
-        ftepp_delete(ftepp);
+    if (!ftepp_preprocess(ftepp))
         return false;
-    }
     return ftepp_preprocess_done();
 }
 
@@ -1250,10 +1248,8 @@ bool ftepp_preprocess_string(const char *name, const char *str)
         con_out("failed to create lexer for string \"%s\"\n", name);
         return false;
     }
-    if (!ftepp_preprocess(ftepp)) {
-        ftepp_delete(ftepp);
+    if (!ftepp_preprocess(ftepp))
         return false;
-    }
     return ftepp_preprocess_done();
 }