]> spindle.queued.net Git - midori/commitdiff
Don't clear bindings of an erroneous sqlite statement
authorChristian Dywan <christian@twotoasts.de>
Tue, 22 Jun 2010 21:15:25 +0000 (23:15 +0200)
committerChristian Dywan <christian@twotoasts.de>
Wed, 23 Jun 2010 00:12:56 +0000 (02:12 +0200)
This is not safe and can cause a crash.

midori/midori-browser.c

index 5b26f46caf1ed421eb53f7afe413ba8d657e319b..75c5f31416699d1e9e09947fec29cbebecfcecc8 100644 (file)
@@ -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);