Fix double free on closing open project
Merge pull request #6 from veaceslav/master

NO sig segv