From: Christian Dywan Date: Tue, 22 Jun 2010 21:15:25 +0000 (+0200) Subject: Don't clear bindings of an erroneous sqlite statement X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eec5359cf52c2df47b2564790ce22358363de6ff;p=midori Don't clear bindings of an erroneous sqlite statement This is not safe and can cause a crash. --- diff --git a/midori/midori-browser.c b/midori/midori-browser.c index 5b26f46c..75c5f314 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -3760,7 +3760,8 @@ _action_location_submit_uri (GtkAction* action, g_printerr (_("Failed to insert new history item: %s\n"), sqlite3_errmsg (db)); sqlite3_reset (statement); - sqlite3_clear_bindings (statement); + if (sqlite3_step (statement) == SQLITE_DONE) + sqlite3_clear_bindings (statement); #endif g_free (keywords);