Opened 8 years ago
Last modified 3 years ago
#4260 new defect
CCmpSelectable.cpp segfaults when selecting a building without footprint — at Initial Version
Reported by: | elexis | Owned by: | |
---|---|---|---|
Priority: | If Time Permits | Milestone: | Backlog |
Component: | Simulation | Keywords: | simple |
Cc: | Patch: |
Description
Reproduce: remove <Footprint>
from binaries/data/mods/public/simulation/templates/template_structure_civic_civil_centre.xml
and start a game, select the cc.
Stack:
0x000000000052ab6d in CCmpSelectable::RenderSubmit (collector=..., this=0x526b460) at ../../../source/simulation2/components/CCmpSelectable.cpp:629 629 m_BuildingOverlay->m_Color = m_Color; // done separately so alpha changes don't require a full update call
The cpp component shouldn't crash in such a case but detect the missing footprint component when trying to access it, show an error message and exit gracefully.
Furthermore the GetSchema()
should be extended to require Footprint
.
Note:
See TracTickets
for help on using tickets.