Fix building on MSVC & fix a double-free crash

This commit is contained in:
Edgaru089 2024-04-30 16:32:01 +08:00
parent e27ab237ba
commit 4873eb898a
3 changed files with 13 additions and 0 deletions

View File

@ -139,6 +139,7 @@
<ClInclude Include="entity.h" />
<ClInclude Include="gametime.h" />
<ClInclude Include="input.h" />
<ClInclude Include="leaderboards.h" />
<ClInclude Include="mapper_misc.h" />
<ClInclude Include="particle.h" />
<ClInclude Include="physics.h" />
@ -166,6 +167,8 @@
<ClCompile Include="entity.c" />
<ClCompile Include="gametime.c" />
<ClCompile Include="input.c" />
<ClCompile Include="leaderboards.c" />
<ClCompile Include="leaderboards_file.c" />
<ClCompile Include="main.cpp" />
<ClCompile Include="mapper_misc.c" />
<ClCompile Include="mapper_misc_render.cpp" />

View File

@ -84,6 +84,9 @@
<ClInclude Include="ui.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="leaderboards.h">
<Filter>头文件</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="util\queue.c">
@ -188,5 +191,11 @@
<ClCompile Include="ui_boxbuilder.c">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="leaderboards.c">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="leaderboards_file.c">
<Filter>源文件</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -70,6 +70,7 @@ static void _ui_Action_EndIntermission(System_UI *sys, ui_Part *part, uintptr_t
// should be able to just use this
_ui_Action_SelectLevel(sys, part, data);
free((void *)data);
((ui_Button *)part->user)->callback_data = NULL;
}
}