From eec5359cf52c2df47b2564790ce22358363de6ff Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Tue, 22 Jun 2010 23:15:25 +0200 Subject: [PATCH] Don't clear bindings of an erroneous sqlite statement This is not safe and can cause a crash. --- midori/midori-browser.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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);