diff options
author | flow <flowlnlnln@gmail.com> | 2022-08-01 18:34:15 -0300 |
---|---|---|
committer | flow <flowlnlnln@gmail.com> | 2022-08-01 18:34:15 -0300 |
commit | 4a8abc948ef15664dbde196ba77daccdf3d623ad (patch) | |
tree | 0c8f6b7dafb29ca2cbab34bffd19e3747f195f80 /launcher/modplatform/helpers | |
parent | cee41b87f728e79d7e1ec0e67c24dc23a5dde9d0 (diff) | |
download | PrismLauncher-4a8abc948ef15664dbde196ba77daccdf3d623ad.tar.gz PrismLauncher-4a8abc948ef15664dbde196ba77daccdf3d623ad.tar.bz2 PrismLauncher-4a8abc948ef15664dbde196ba77daccdf3d623ad.zip |
fix: prevent segfault due to callbacks into deleted objects
Since network requests are, for the most part, asynchronous, there's a
chance a request only comes through after the request sender has already
been deleted.
This adds a global (read static) hash table relating models for the mod
downloader to their status (true = alive, false = destroyed). It is a
bit of a hack, but I couldn't come up with a better way of doing this.
To reproduce the issue before this commit: scroll really quickly through
CF mods, to trigger network requests for their versions and description.
Then, in the middle of it close the mod downloader. Sometimes this will
create a crash.
Signed-off-by: flow <flowlnlnln@gmail.com>
Diffstat (limited to 'launcher/modplatform/helpers')
0 files changed, 0 insertions, 0 deletions