From d4cce391f9836996667067771e4ce9ca64d3fb3c Mon Sep 17 00:00:00 2001 From: Wolf Bergenheim Date: Wed, 7 Apr 2010 14:42:07 +0300 Subject: fixed bug #161198 --- libresourceqt/src/resource-set.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libresourceqt/src/resource-set.cpp') diff --git a/libresourceqt/src/resource-set.cpp b/libresourceqt/src/resource-set.cpp index af0a6fc..b7a302b 100644 --- a/libresourceqt/src/resource-set.cpp +++ b/libresourceqt/src/resource-set.cpp @@ -58,6 +58,8 @@ void ResourceSet::addResourceObject(Resource *resource) { if(resource == NULL) return; + delete resourceSet[resource->type()]; + resourceSet[resource->type()] = resource; if (resource->type() == AudioPlaybackType) { audioResource = static_cast(resource); QObject::connect(audioResource, @@ -73,8 +75,6 @@ void ResourceSet::addResourceObject(Resource *resource) registerAudioProperties(); } } - delete resourceSet[resource->type()]; - resourceSet[resource->type()] = resource; } bool ResourceSet::addResource(ResourceType type) -- cgit v1.2.3