Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.1:Update
thinkeramik
fix-pixmaploader.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fix-pixmaploader.diff of Package thinkeramik
------------------------------------------------------------------------ r559665 | orlovich | 2006-07-08 01:56:40 +0200 (Sat, 08 Jul 2006) | 4 lines Fix memory leak with super-large widgets, reported by Martin Pley. (Also fix my addy as I am touching the file) ------------------------------------------------------------------------ --- widget-engine/pixmaploader.cpp (revision 559664) +++ widget-engine/pixmaploader.cpp (revision 559665) @@ -290,13 +290,17 @@ QPixmap PixmapLoader::scale( int name, i else result = new QPixmap(img->smoothScale( width ? width : img->width(), height ? height: img->height())); + delete img; ThinKeramikCacheEntry* toAdd = new ThinKeramikCacheEntry(entry); toAdd->m_pixmap = result; - m_pixmapCache.insert(key, toAdd, result->width()*result->height()*result->depth()/8); - - delete img; + if (!m_pixmapCache.insert(key, toAdd, result->width()*result->height()*result->depth()/8)) { + QPixmap toRet = *result; + delete toAdd; + return toRet; + } + return *result; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor