Update reinterpret_cast call that should be dynamic_cast

This commit is contained in:
Ryan Huffman 2015-07-14 14:49:51 -07:00
parent 84796b20e0
commit 4d9b28688d

View file

@ -1413,8 +1413,9 @@ void DomainServer::processICEPingReplyPacket(QSharedPointer<NLPacket> packet) {
}
void DomainServer::processNodeJSONStatsPacket(QSharedPointer<NLPacket> packet, SharedNodePointer sendingNode) {
if (sendingNode->getLinkedData()) {
reinterpret_cast<DomainServerNodeData*>(sendingNode->getLinkedData())->processJSONStatsPacket(*packet);
auto nodeData = dynamic_cast<DomainServerNodeData*>(sendingNode->getLinkedData());
if (nodeData) {
nodeData->processJSONStatsPacket(*packet);
}
}