diff options
author | Max Kellermann <max@duempel.org> | 2014-12-12 21:23:22 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-12-12 21:43:54 +0100 |
commit | 80ddf4aecf2b865e4d4bb5f9f621b51c34a44122 (patch) | |
tree | 1f83f548cb18b9746422316c1a07de226e4e5656 /src/sticker | |
parent | 12b4a666bc730cb46ba5da6b576905166d249eff (diff) |
sticker/Database: always invoke sqlite3_reset() and sqlite3_clear_bindings()
Diffstat (limited to 'src/sticker')
-rw-r--r-- | src/sticker/StickerDatabase.cxx | 8 |
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 |