]> err.no Git - mapper/commitdiff
Make sure the statement is NULL if preparation fails.
authorKaj-Michael Lang <milang@tal.org>
Tue, 18 Mar 2008 18:58:15 +0000 (20:58 +0200)
committerKaj-Michael Lang <milang@tal.org>
Tue, 18 Mar 2008 18:58:15 +0000 (20:58 +0200)
src/db.h

index a6e3f2c6beef0dfe51c6a1b43ea7a50d59d8e9e2..e5127388026e920e9f409f4e4ee191681f18a784 100644 (file)
--- 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; \
        }