error when standalone application closes

Hy.
I made a simple game in Unity. I build it as a standalone windows application.

When I run the game, evreything works fine, no error, it’s just that when I close the game I get an error, after the game window closes (on some computers, not all):
“mygame.exe has stopped working. A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available”

This error I got on a Windows Vista. I got the error also, on a Windows XP and the error text was, I think, the same.

I run the game in fullscreen and I close it with “Application.Quit”.

Maybe you have some idea why I get this error.
Thanks

Can you post the code you are using to close the application? (I’m guessing you require the user to click on a button or something.) It sounds like this is a bug, but it might be worth checking out first.

ok. So, I found a solution. Looks like the error only appears when I close the application from fullscreen mode. So I made a workaround. When I close the application, I switch to window mode, wait a few seconds (during witch I show a goodbye message), and then call Application.Quit();

If I find a better solution, I’ll let you know