Hack for IMuseGM threading problem
|Reported by:||SF/jamieson630||Owned by:||SF/jamieson630|
|Cc:||Game:||Day of the Tentacle|
The included patch fixes a threading problem that occurs under -ewindows during complex musical passages. This problem was reported under Bug #601926 (random crashes in the DOTT #2 cutscene).
Frequent clearing and reallocating of Player objects causes numerous uninit() calls for all the Parts belonging to the Players. These calls clear the _player pointer for each Part. Because of threading issues, the Part objects may still be trying to conduct operations at the time that uninit() is called -- and some of those operations require the use of the _player pointer.
This patch is a hack to make sure that the _player pointer is validated on-the-spot each time that it's used. If it has been removed, an appropriate default value is substituted in place of whatever was being loaded from the Player object.
Ticket imported from: #615737. Ticket imported from: patches/171.