if the name is empty, don't even bother, and spew and error

svn path=/trunk/KDE/kdelibs/; revision=969912
This commit is contained in:
Aaron J. Seigo 2009-05-19 08:53:56 +00:00
parent 652694c5fd
commit 3984fdb402

View File

@ -437,8 +437,9 @@ QString Theme::themeName() const
QString Theme::imagePath(const QString &name) const QString Theme::imagePath(const QString &name) const
{ {
// look for a compressed svg file in the theme // look for a compressed svg file in the theme
if (name.contains("../")) { if (name.contains("../") || name.isEmpty()) {
// we don't support relative paths // we don't support relative paths
kDebug() << "Theme says: bad image path " << name;
return QString(); return QString();
} }