From e0b13f112bb3aa037434a040709636d47ac1752a Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Wed, 8 May 2024 23:17:20 +0500 Subject: fix: the transaction didn't close properly --- src/commands/request_util.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/commands/request_util.cpp b/src/commands/request_util.cpp index fe1d1d4..3d44054 100644 --- a/src/commands/request_util.cpp +++ b/src/commands/request_util.cpp @@ -26,6 +26,7 @@ namespace bot::command { std::string command_id = parts[0]; if (command_id.substr(0, DEFAULT_PREFIX.length()) != DEFAULT_PREFIX) { + delete work; return std::nullopt; } @@ -38,6 +39,7 @@ namespace bot::command { [&](const auto &command) { return command->get_name() == command_id; }); if (cmd == command_loader.get_commands().end()) { + delete work; return std::nullopt; } -- cgit v1.2.3