NullReference Exception on Close App

  • Thread starter Thread starter Larry Re
  • Start date Start date
L

Larry Re

I've written a small C# app which appears to work perfectly except for the
fact that I get a NullReference exception when I close the form using the
red 'X' in the upper right hand corner of the form. Any ideas on why this
might be happening?

Please remove 'X's from email address to reply
 
Larry,

Can you give any details about what you are doing in your app? Maybe
even a call stack?
 
Hi Larry,

A piece of code would help a lot, without it we can only guess.

Here are my guesses:
1- Check the Dispose() you may be accesing some object already disposed or
nulled or even never assigned
2- Check the Closing handler , search for the same conditions.


If you don't solve it, please post the code for both methods.

Cheers,
 
Back
Top