mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-16 08:13:44 +02:00
Merge pull request #1214 from birarda/assignment
fix for deleteLater on Node linkedData
This commit is contained in:
commit
77343695a1
2 changed files with 7 additions and 7 deletions
|
@ -12,9 +12,6 @@
|
|||
#include <sys/time.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include <QtCore/QCoreApplication>
|
||||
|
||||
|
||||
#include <Logging.h>
|
||||
#include <NodeList.h>
|
||||
#include <PacketHeaders.h>
|
||||
|
@ -41,8 +38,6 @@ int argc = 0;
|
|||
char** argv = NULL;
|
||||
|
||||
void childClient() {
|
||||
QCoreApplication application(::argc, ::argv);
|
||||
|
||||
// set the logging target to the the CHILD_TARGET_NAME
|
||||
Logging::setTargetName(CHILD_TARGET_NAME);
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "SharedUtil.h"
|
||||
#include "UDPSocket.h"
|
||||
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtCore/QDebug>
|
||||
|
||||
Node::Node(const QUuid& uuid, char type, sockaddr* publicSocket, sockaddr* localSocket) :
|
||||
|
@ -43,8 +44,12 @@ Node::~Node() {
|
|||
delete _publicSocket;
|
||||
delete _localSocket;
|
||||
|
||||
if (_linkedData) {
|
||||
_linkedData->deleteLater();
|
||||
if (QCoreApplication::instance()) {
|
||||
if (_linkedData) {
|
||||
_linkedData->deleteLater();
|
||||
}
|
||||
} else {
|
||||
delete _linkedData;
|
||||
}
|
||||
|
||||
delete _bytesReceivedMovingAverage;
|
||||
|
|
Loading…
Reference in a new issue