Commit b81bc33
committed
Fix engine crash in SV_SetClient_Ping by ensuring gentity_t::client is never null
- In AllocateClientArray, link g_entities[i+1].client to game.clients[i] immediately.
- In FreeClientArray, link g_entities[i+1].client to a static dummy client instead of nullptr.
- This prevents race conditions during map restarts/shutdowns where the engine might access client structures after they are freed but before the entity array is reset.1 parent b8818e3 commit b81bc33
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| |||
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
81 | | - | |
| 83 | + | |
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
| |||
0 commit comments