From kde-commits Sun Sep 26 23:30:05 2010 From: Christoph Feck Date: Sun, 26 Sep 2010 23:30:05 +0000 To: kde-commits Subject: KDE/kdelibs/kdeui/icons Message-Id: <20100926233005.D9D62AC857 () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=128554344421692 SVN commit 1180089 by cfeck: Fix crash when no icon group and size is specified Re-add the kWarning() from 4.4 branch and fall back to KIconLoader::Desktop size in this case. The bug in kvpnc is in KVpnc::initAction(), first three lines: The loadIcon() calls specify no group and size. One of them must be passed so that the loader knows which size the result pixmap should have. It is probably simplest to replace those calls with KIcon("iconname") constructs. CCBUG: 246016 M +6 -1 kiconloader.cpp --- trunk/KDE/kdelibs/kdeui/icons/kiconloader.cpp #1180088:1180089 @@ -753,8 +753,13 @@ } // If size == 0, use default size for the specified group. - if (size == 0 && group != KIconLoader::User) + if (size == 0) { + if (group < 0) + { + kWarning(264) << "Neither size nor group specified!"; + group = KIconLoader::Desktop; + } size = mpGroups[group].size; } }