Merge pull request #1214 from birarda/assignment

fix for deleteLater on Node linkedData
This commit is contained in:
ZappoMan 2013-11-07 12:55:10 -08:00
commit 77343695a1
2 changed files with 7 additions and 7 deletions

View file

@ -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);

View file

@ -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;