]> spindle.queued.net Git - midori/commitdiff
Don't reset NULL stmt in location popup
authorAlexander Butenko <a.butenka@gmail.com>
Tue, 3 Jan 2012 20:34:45 +0000 (21:34 +0100)
committerChristian Dywan <christian@twotoasts.de>
Tue, 3 Jan 2012 20:34:45 +0000 (21:34 +0100)
Fixes: https://bugs.launchpad.net/bugs/910353
midori/midori-locationaction.c

index 47d2e3d01e031c7efefe586f1b1518dde9471337..64e652b455ed067c72c7cac1c177c34b02dd16f2 100644 (file)
@@ -518,8 +518,12 @@ midori_location_action_popup_timeout_cb (gpointer data)
         matches++;
         result = sqlite3_step (stmt);
     }
-    sqlite3_reset (stmt);
-    sqlite3_clear_bindings (stmt);
+
+    if (stmt)
+    {
+        sqlite3_reset (stmt);
+        sqlite3_clear_bindings (stmt);
+    }
 
     if (action->search_engines)
     {