Permalink
Browse files

vnsi add-on: fix segfault on unsuccessful login

  • Loading branch information...
1 parent 9c1c00d commit 9ca994028c1bffeab14c871d17924c1b7afb2c20 @FernetMenta FernetMenta committed with Apr 24, 2012
Showing with 6 additions and 3 deletions.
  1. +6 −3 xbmc/pvrclients/vdr-vnsi/VNSISession.cpp
@@ -151,9 +151,12 @@ bool cVNSISession::Login()
catch (const char * str)
{
XBMC->Log(LOG_ERROR, "%s - %s", __FUNCTION__,str);
- m_socket->Close();
- delete m_socket;
- m_socket = NULL;
+ if (m_socket)
+ {
+ m_socket->Close();
+ delete m_socket;
+ m_socket = NULL;
+ }
return false;
}

0 comments on commit 9ca9940

Please sign in to comment.