From 5048118a8316831475b35c849fbb9b1b60905ff2 Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Tue, 18 Mar 2008 20:58:15 +0200 Subject: [PATCH] Make sure the statement is NULL if preparation fails. --- src/db.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/db.h b/src/db.h index a6e3f2c..e512738 100644 --- a/src/db.h +++ b/src/db.h @@ -28,6 +28,7 @@ if (sqlite3_prepare_v2(db_, sql_, -1, &stmt_, NULL)!=SQLITE_OK) { \ g_printerr("Failed to prepare: [%s] Error: %s", \ sql_, sqlite3_errmsg(db_)); \ + stmt_=NULL; \ return FALSE; \ } -- 2.39.5