Adding conditional call to a pointer that might crash if connection is lost

parent 9fead1e1
......@@ -195,6 +195,9 @@ void CVANetMessage::WriteAnswer()
try
{
if (!m_pConnection)
VISTA_THROW("Seems like the VA connections is lost, can not write VA net message answer", 255);
// It appears to be safe to transmit an entire buffer of arbitrary size on sender side
int nRet = m_pConnection->WriteRawBuffer( m_oOutgoing.GetBuffer(), m_oOutgoing.GetBufferSize() );
m_pConnection->WaitForSendFinish();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment