Your analysis is probably correct. It will try to get to a file of a 'unloaded' project, will get some NULL pointer, and crash boom bang.
I remember someone once suggested, if you close a project, also clean up the build log (if the build log was for that project, should check that!). When this would be done, hehe, no chance of getting to that NULL pointer. ;-)