fix missing import
only free texture if it exists
clean up resources
Merge branch 'master' into develop
Merge branch 'master' of github.com:ylegall/Dmise into develop