[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: =?utf-8?q?=5Bamarok=5D_src/core-impl/collections/db/sql=3A_Bug_2?=
From: Ralf Engels <ralf-engels () gmx ! de>
Date: 2011-02-20 23:36:34
Message-ID: 20110220233634.EB70CA60A9 () git ! kde ! org
[Download RAW message or body]
Git commit 351c38a9f8295f928af1660d8249f73050f5b52e by Ralf Engels.
Committed on 20/02/2011 at 18:29.
Pushed by rengels into branch 'master'.
Bug 247400
M +1 -1 src/core-impl/collections/db/sql/SqlMeta.cpp
http://commits.kde.org/amarok/351c38a9f8295f928af1660d8249f73050f5b52e
diff --git a/src/core-impl/collections/db/sql/SqlMeta.cpp \
b/src/core-impl/collections/db/sql/SqlMeta.cpp index 4580f6a..c425448 100644
--- a/src/core-impl/collections/db/sql/SqlMeta.cpp
+++ b/src/core-impl/collections/db/sql/SqlMeta.cpp
@@ -1241,7 +1241,7 @@ SqlTrack::addLabel( const Meta::LabelPtr &label )
QString countQuery = "SELECT COUNT(*) FROM urls_labels WHERE url = %1 AND \
label = %2;";
QStringList countRs = m_collection->sqlStorage()->query( countQuery.arg( \
QString::number( m_urlId ), QString::number( sqlLabel->id() ) ) );
- if( countRs.first().toInt() == 0 )
+ if( !countRs.isEmpty() && countRs.first().toInt() == 0 )
{
QString insert = "INSERT INTO urls_labels(url,label) VALUES (%1,%2);";
m_collection->sqlStorage()->insert( insert.arg( QString::number( m_urlId \
), QString::number( sqlLabel->id() ) ), "urls_labels" );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic