Interrupt / systemshock

Shockolate - A minimalist and cross platform System Shock source port.
GNU General Public License v3.0
806 stars 65 forks source link

Fix animated screen not loaded crash #223

Closed donnierussellii closed 5 years ago

donnierussellii commented 5 years ago

Crash setup: Load a save game just before entering cyberspace to fight shodan. Win or lose game and return to menu. Load save game in west elevator on level 2. Walk into the hallway near the animated screens in the room full of bodies. As soon as the game tries to render the screens the game crashes.

What happens is that in show_obj() the animated screen texture tries to load but fails (there is a message in the console). I can't find the cause, but in the meantime prevent the crash by checking for a null bitmap. The screens on the walls won't appear, though.

Exiting the program, then loading the save and walking near the screens fixes the problem. It might be related to some quirk of how resources are handled.

Edit: The screens seem to load now, or I haven't been able to reproduce the issue anymore.

Edit2: The null checks can't hurt, anyway.