[Bf-blender-cvs] [4de2c21] soc-2014-fluid: closing file correctly

Roman Pogribnyi noreply at git.blender.org
Sun Aug 3 17:46:11 CEST 2014


Commit: 4de2c21a405596b6b914f372ee63018a462535d8
Author: Roman Pogribnyi
Date:   Sun Aug 3 17:45:54 2014 +0200
Branches: soc-2014-fluid
https://developer.blender.org/rB4de2c21a405596b6b914f372ee63018a462535d8

closing file correctly

===================================================================

M	source/blender/python/manta_pp/pwrapper/pymain.cpp

===================================================================

diff --git a/source/blender/python/manta_pp/pwrapper/pymain.cpp b/source/blender/python/manta_pp/pwrapper/pymain.cpp
index 70f1971..af6a53f 100644
--- a/source/blender/python/manta_pp/pwrapper/pymain.cpp
+++ b/source/blender/python/manta_pp/pwrapper/pymain.cpp
@@ -93,7 +93,9 @@ void runMantaScript(vector<string>& args) {
 //		std::string py_string_1 = py_string_0.append(")\0");
 //		PyRun_SimpleString(py_string_1.c_str());
 //	}
-	fclose(fp);    
+	if (fp != NULL){
+		fclose(fp);    
+	}
 #endif
 	
 	debMsg("Script finished.", 0);




More information about the Bf-blender-cvs mailing list