diff --git a/NetworkSync.cpp b/NetworkSync.cpp index 1c35879..abd2014 100644 --- a/NetworkSync.cpp +++ b/NetworkSync.cpp @@ -28,8 +28,9 @@ void NetworkSync::ReceiveMessage(Roboid *roboid, unsigned char bytecount) { void NetworkSync::ReceiveNetworkId() { this->networkId = buffer[1]; #ifdef RC_DEBUG - printf("Received network Id %d\n", this->networkId); + printf("_Received network Id %d\n", this->networkId); #endif + PublishModel(roboid); } void NetworkSync::NewObject(InterestingThing *thing) { @@ -50,6 +51,9 @@ void NetworkSync::NewObject(InterestingThing *thing) { } void NetworkSync::PublishModel(Roboid *roboid) { + if (roboid->modelUrl == nullptr) + return; + int len = strlen(roboid->modelUrl); if (len > 255) return;