Skip to content

Commit

Permalink
fix segfault
Browse files Browse the repository at this point in the history
  • Loading branch information
nic11 committed Jan 14, 2025
1 parent d64badf commit fef7c63
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion skymp5-server/cpp/server_guest_lib/WorldState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,9 @@ const std::shared_ptr<MpForm>& WorldState::LookupFormById(
std::stringstream* optionalOutTrace;

~Deferred() {
*optionalOutTrace << "look at my horse, my horse is amazing:\n" << ctx.Resolve();
if (optionalOutTrace) {
*optionalOutTrace << "look at my horse, my horse is amazing:\n" << ctx.Resolve();
}
}
} def{ctx, optionalOutTrace};

Expand Down

0 comments on commit fef7c63

Please sign in to comment.