diff options
| author | Dirk Mueller <[email protected]> | 2008-07-15 21:03:55 +0000 |
|---|---|---|
| committer | Dirk Mueller <[email protected]> | 2008-07-15 21:03:55 +0000 |
| commit | 08989d295c6499e6f9e40211d0c76e66800ee25a (patch) | |
| tree | bd81cc03e918046ec1143000abcd20fe0986beaf /src | |
| parent | b5e97174d08ab59eca35deaaa9a84a7838f51bfb (diff) | |
fix crash
svn path=/trunk/KDE/kdebase/apps/; revision=832953
Diffstat (limited to 'src')
| -rw-r--r-- | src/tagcloud/tagcloud.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tagcloud/tagcloud.cpp b/src/tagcloud/tagcloud.cpp index a3fe2035e..058e2a91b 100644 --- a/src/tagcloud/tagcloud.cpp +++ b/src/tagcloud/tagcloud.cpp @@ -464,7 +464,8 @@ void Nepomuk::TagCloud::Private::rebuildCloud() // binary search in row TagNode* Nepomuk::TagCloud::Private::findTagInRow( const QList<TagNode*>& row, const QPoint& pos ) { - int x = row.count() * pos.x() / m_parent->width(); + int x = m_parent->width() ? row.count() * pos.x() / m_parent->width() : 0; + int i = 0; while ( 1 ) { if ( x-i >= 0 && x-i < row.count() && row[x-i]->zoomedRect.contains( pos ) ) { @@ -485,7 +486,7 @@ TagNode* Nepomuk::TagCloud::Private::findTagInRow( const QList<TagNode*>& row, c // binary search in cloud TagNode* Nepomuk::TagCloud::Private::tagAt( const QPoint& pos ) { - int y = rows.count() * pos.y() / m_parent->height(); + int y = m_parent->height() ? rows.count() * pos.y() / m_parent->height() : 0; int i = 0; while ( 1 ) { |
