From d999c34c316f53a85fe94bebeabfe6bbf8810975 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Thu, 14 Oct 2010 13:04:28 +0000 Subject: [PATCH] fd is 0 by this point svn path=/trunk/KDE/kdelibs/; revision=1185878 --- framesvg.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/framesvg.cpp b/framesvg.cpp index 7901ad508..6d1615eca 100644 --- a/framesvg.cpp +++ b/framesvg.cpp @@ -84,7 +84,8 @@ void FrameSvg::setImagePath(const QString &path) if (!fd) { // we need to replace our frame, start by looking in the frame cache - const QString key = d->cacheId(fd, d->prefix); + FrameData *oldFd = d->frames[d->prefix]; + const QString key = d->cacheId(oldFd, d->prefix); fd = FrameSvgPrivate::s_sharedFrames.value(key); if (fd) { @@ -96,7 +97,7 @@ void FrameSvg::setImagePath(const QString &path) } else { // nothing exists for us in the cache, so create a new FrameData based // on the old one - fd = new FrameData(*d->frames[d->prefix], this); + fd = new FrameData(*oldFd, this); } d->frames.insert(d->prefix, fd);