Skip to content
This repository was archived by the owner on Jan 12, 2022. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions addons/sourcemod/scripting/nativevotes.sp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ EngineVersion g_EngineVersion = Engine_Unknown;

#include "nativevotes/data-keyvalues.sp"

#define VERSION "1.1.0 beta 8"
#define VERSION "1.1.1"

#define LOGTAG "NV"

Expand Down Expand Up @@ -821,7 +821,7 @@ Action DoAction(NativeVote vote, MenuAction action, int param1, int param2, Acti
{
Action res = def_res;

Handle handler = Data_GetHandler(vote);
Handle handler = CloneHandle(Data_GetHandler(vote));
#if defined LOG
LogMessage("Calling Menu forward for vote: %d, handler: %d, action: %d, param1: %d, param2: %d", vote, handler, action, param1, param2);
#endif
Expand All @@ -831,6 +831,7 @@ Action DoAction(NativeVote vote, MenuAction action, int param1, int param2, Acti
Call_PushCell(param1);
Call_PushCell(param2);
Call_Finish(res);
delete handler;
return res;
}

Expand Down
2 changes: 2 additions & 0 deletions addons/sourcemod/scripting/nativevotes/game.sp
Original file line number Diff line number Diff line change
Expand Up @@ -2368,6 +2368,8 @@ static void TF2CSGO_SendOptionsToClient(NativeVote vote, int client)
}
optionsEvent.SetInt("count", itemCount);
optionsEvent.FireToClient(client);

delete optionsEvent;
}

static void CSGO_VotePass(const char[] translation, const char[] details, int team, int client=0)
Expand Down