[Freeciv-Dev] (PR#4521) SDL diplomat/city pointers may be garbage
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
In most GUIs when a diplomat dialog is popped up the GUI tracks the ID
of the diplomat and that of the target city or unit.
In gui-sdl, however, pointers to the unit/city are tracked instead.
This is unsafe since while the diplomat dialog is up action continues
(at least it should), and the diplomat, target unit, or target city may
die. This would then mean the pointer points to garbage, giving
unpredictible and bad results.
Note how in other GUIs there are careful checks to make sure the
diplomat and target still exist (find_unit_by_id/find_city_by_id) before
the request is sent to the server.
jason
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#4521) SDL diplomat/city pointers may be garbage,
Jason Short <=
|
|