From b805725a61975ac652534e1b7b538f9cd5432252 Mon Sep 17 00:00:00 2001 From: Leon Marz Date: Tue, 31 Aug 2021 12:17:48 +0200 Subject: [PATCH] ProjectFileIO: Check for SQLITE_ENABLE_DBPAGE_VTAB option Signed-off-by: Leon Marz --- src/ProjectFileIO.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ProjectFileIO.cpp b/src/ProjectFileIO.cpp index d8af7752b..c697a37a9 100644 --- a/src/ProjectFileIO.cpp +++ b/src/ProjectFileIO.cpp @@ -2389,6 +2389,12 @@ int64_t ProjectFileIO::GetDiskUsage(DBConnection &conn, SampleBlockID blockid /* int64_t right = 0; int rc; + // "sqlite_dbpage" is a compile-time defined option + if(!sqlite3_compileoption_used("SQLITE_ENABLE_DBPAGE_VTAB")) + { + return 0; + } + // Get the rootpage for the sampleblocks table. sqlite3_stmt *stmt = conn.Prepare(DBConnection::GetRootPage,