From 9c2b9d28892c33e4e4b4c2184b92d817e4d2f763 Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Sat, 2 Apr 2016 00:36:50 -0700 Subject: [PATCH] Crash fix --- project/src/ExternalInterface.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/project/src/ExternalInterface.cpp b/project/src/ExternalInterface.cpp index b5cb05885..42151bcac 100644 --- a/project/src/ExternalInterface.cpp +++ b/project/src/ExternalInterface.cpp @@ -1201,7 +1201,15 @@ namespace lime { if (path) { value _path = alloc_string (path); - free ((char*) path); + + if (type != 4) { + + // TODO: Make this more consistent + + free ((char*) path); + + } + return _path; } else {