Check ptr

This commit is contained in:
Atlante45 2015-07-15 16:33:04 -07:00
parent cb64b0353e
commit ce5bcb8de1

View file

@ -182,7 +182,7 @@ void PacketReceiver::processDatagrams() {
auto nodeList = DependencyManager::get<LimitedNodeList>();
while (nodeList->getNodeSocket().hasPendingDatagrams()) {
while (nodeList && nodeList->getNodeSocket().hasPendingDatagrams()) {
// setup a buffer to read the packet into
int packetSizeWithHeader = nodeList->getNodeSocket().pendingDatagramSize();
std::unique_ptr<char> buffer = std::unique_ptr<char>(new char[packetSizeWithHeader]);