Something I did recently started causing a crash on exit, and I can't figure out what it is. Like the unbelievable retard I am, I just said to myself I'll find it later, and keep working on what I was working on. Now I don't have much of a way to figure out what is causing it, considering the call stack is nothing but MFC42D! xxxxxxxxx with AfxWinMain and such at the bottom. The curious thing is that it only seems to happen when I have a document open (the app is MDI). If there is no document open in the app when closing, it closes fine. I can open, create new, and close all the documents I want without a crash, but as long as there aren't any open when closing, it works fine.
Anything that might cause this would be extremely helpful, since I am stumped short of going through and removing everything until it stops happening.
