Skip to content
Permalink
Browse files

Destroy spatialite context after closing database

  • Loading branch information
m-kuhn committed Nov 14, 2017
1 parent 35808f1 commit ecd4ee1731cd9b802220127eaa7bebf35c204641
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/core/qgsspatialiteutils.cpp
@@ -87,14 +87,14 @@ sqlite3_statement_unique_ptr spatialite_database_unique_ptr::prepare( const QStr

void QgsSpatialiteCloser::operator()( sqlite3 *handle )
{
#if defined(SPATIALITE_HAS_INIT_EX)
spatialite_cleanup_ex( mSpatialiteContext );
mSpatialiteContext = nullptr;
#endif

int res = sqlite3_close( handle );
if ( res != SQLITE_OK )
{
QgsDebugMsg( QStringLiteral( "sqlite3_close() failed: %1" ).arg( res ) );
}
#if defined(SPATIALITE_HAS_INIT_EX)
spatialite_cleanup_ex( mSpatialiteContext );
mSpatialiteContext = nullptr;
#endif

}

0 comments on commit ecd4ee1

Please sign in to comment.
You can’t perform that action at this time.