Skip to content

(SPD): Fix potential crash when registering spds through the api#30

Merged
Sewer56 merged 1 commit intoSewer56:mainfrom
AnimatedSwine37:main
Apr 21, 2025
Merged

(SPD): Fix potential crash when registering spds through the api#30
Sewer56 merged 1 commit intoSewer56:mainfrom
AnimatedSwine37:main

Conversation

@AnimatedSwine37
Copy link
Copy Markdown
Contributor

A small fix to change the _pathToStream Dictionary to a ConcurrenctDictionary to prevent an exception being thrown when registering a file through the API whilst something else is using the dictionary already.
This now matches with PAK, BMD, and BF emulators which also use a ConcurrentDictionary for this.

I'd guess that this was never encountered before because TryAdd was being used (which I changed in #29), so possibly the registered files weren't actually being registered. Hopefully it is the only problem, everything else seems good so far.

@Sewer56 Sewer56 merged commit d708502 into Sewer56:main Apr 21, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants