Commit 6589ff3c authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Do not bind invalid primary key

parent 1d34596e
......@@ -18,7 +18,8 @@ class SqliteTools
int res = sqlite3_prepare_v2( dbConnection, req, -1, &stmt, NULL );
if ( res != SQLITE_OK )
return false;
sqlite3_bind_int( stmt, 1, foreignKey );
if ( foreignKey != 0 )
sqlite3_bind_int( stmt, 1, foreignKey );
res = sqlite3_step( stmt );
while ( res == SQLITE_ROW )
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment