summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2024-05-08 23:17:20 +0500
committerilotterytea <iltsu@alright.party>2024-05-08 23:17:20 +0500
commite0b13f112bb3aa037434a040709636d47ac1752a (patch)
tree94aa25310c892dcd711524a13983d840d9096b15 /src
parent60830b2cd486d49e9955b1ad0e7f7a5205829949 (diff)
fix: the transaction didn't close properly
Diffstat (limited to 'src')
-rw-r--r--src/commands/request_util.cpp2
1 files changed, 2 insertions, 0 deletions
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;
}