gawindx / WinNUT-Client

This is a NUT windows client for monitoring your ups hooked up to your favorite linux server.
GNU General Public License v3.0
395 stars 70 forks source link

Fix app crash when disconnecting with null streams #50

Closed gbakeman closed 3 years ago

gbakeman commented 3 years ago

Sometimes the Disconnect method is called when one or more of the streams are in a Nothing/null state, which causes an exception and an application crash. I've put in checks for each Close() call to make sure the stream object exists first before closing it. Closes #48. (Sorry, this also includes my previous pull request for removing ignored files.)