aboutsummaryrefslogtreecommitdiffstats
path: root/src/sticker/StickerDatabase.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-12-12 21:23:22 +0100
committerMax Kellermann <max@duempel.org>2014-12-12 21:43:54 +0100
commit80ddf4aecf2b865e4d4bb5f9f621b51c34a44122 (patch)
tree1f83f548cb18b9746422316c1a07de226e4e5656 /src/sticker/StickerDatabase.cxx
parent12b4a666bc730cb46ba5da6b576905166d249eff (diff)
downloadmpd-80ddf4aecf2b865e4d4bb5f9f621b51c34a44122.tar.gz
mpd-80ddf4aecf2b865e4d4bb5f9f621b51c34a44122.tar.xz
mpd-80ddf4aecf2b865e4d4bb5f9f621b51c34a44122.zip
sticker/Database: always invoke sqlite3_reset() and sqlite3_clear_bindings()
Diffstat (limited to 'src/sticker/StickerDatabase.cxx')
-rw-r--r--src/sticker/StickerDatabase.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sticker/StickerDatabase.cxx b/src/sticker/StickerDatabase.cxx
index fd5cbd3ae..69415bd04 100644
--- a/src/sticker/StickerDatabase.cxx
+++ b/src/sticker/StickerDatabase.cxx
@@ -251,14 +251,14 @@ sticker_insert_value(const char *type, const char *uri,
if (!BindAll(stmt, type, uri, name, value))
return false;
- if (!ExecuteCommand(stmt))
- return false;
+ bool success = ExecuteCommand(stmt);
sqlite3_reset(stmt);
sqlite3_clear_bindings(stmt);
- idle_add(IDLE_STICKER);
- return true;
+ if (success)
+ idle_add(IDLE_STICKER);
+ return success;
}
bool