Skip to content

Commit 9e57276

Browse files
KroytzPoggicek
authored andcommitted
fix: incorrect return value cause crash
1 parent de045bd commit 9e57276

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/hook.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ extern std::map<std::pair<std::string, std::string>, std::vector<std::unique_ptr
7070
namespace Hook
7171
{
7272

73-
void Detour_CreateWorldInternal(IWorldRendererMgr* pThis, CSingleWorldRep* singleWorld)
73+
CSingleWorldRep* Detour_CreateWorldInternal(IWorldRendererMgr* pThis, CSingleWorldRep* singleWorld)
7474
{
7575
g_pCreateWorldInternal(pThis, singleWorld);
7676

@@ -100,6 +100,8 @@ void Detour_CreateWorldInternal(IWorldRendererMgr* pThis, CSingleWorldRep* singl
100100
}
101101
}
102102
}
103+
104+
return singleWorld;
103105
}
104106

105107
bool SetupHook()

0 commit comments

Comments
 (0)