Commit 4fd437e
committed
Fix fatal crash unloading maps with custom localize assets (dedicated)
On a dedicated server, unloading a fastfile that contains custom localized
strings (ASSET_TYPE_LOCALIZE_ENTRY) fatally aborts:
Sys_Error: Could not load default asset for asset type ''
DB_UnloadXZoneInternal creates default stubs for the zone's assets, but the
default for LOCALIZE_ENTRY is "CGAME_UNKNOWN", which ships only in the client
localizedstrings zones a dedicated server never loads. DB_FindXAssetDefault-
HeaderInternal returns NULL and the server dies. A client/listen server (and
stock iw3) loads CGAME_UNKNOWN and unloads the same map cleanly; only maps
that bake their own localize entries reach this path.
Skip the missing-default fatal for LOCALIZE_ENTRY. Freeing it without a stub
is safe: localized strings are resolved by name at display time and never
held by pointer, the same reasoning that already leaves RAWFILE / MAP_ENTS
without a default.
(db_xassetdebug 1 names the culprit: the last "removing asset" line before
the abort is the localize entry with no "using default" follow-up.)1 parent cf88a2c commit 4fd437e
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2986 | 2986 | | |
2987 | 2987 | | |
2988 | 2988 | | |
2989 | | - | |
| 2989 | + | |
| 2990 | + | |
| 2991 | + | |
2990 | 2992 | | |
2991 | 2993 | | |
2992 | 2994 | | |
| |||
0 commit comments