From fa9c3a5821eb5afdeaad5f3e6b9145170cb65f1d Mon Sep 17 00:00:00 2001 From: Sandu Liviu Catalin Date: Tue, 19 Jul 2022 19:43:30 +0300 Subject: [PATCH] Check for a valid session pointer. --- module/PocoLib/Data.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/module/PocoLib/Data.cpp b/module/PocoLib/Data.cpp index 274c08e4..06b341e4 100644 --- a/module/PocoLib/Data.cpp +++ b/module/PocoLib/Data.cpp @@ -639,6 +639,10 @@ SqDataAsyncBuilder::SqDataAsyncBuilder(Poco::Data::SessionImpl * session, StackS // ------------------------------------------------------------------------------------------------ void SqDataAsyncBuilder::Submit() { + if (mSession.isNull()) + { + STHROWF("Asynchronous query builder instance is invalid."); + } auto & connector = mSession->connectorName(); // Is this a SQLite session? if (connector == "sqlite")