Fixed two startup/event race conditions. #162
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Just a couple quick fixes to some corner cases I ran across.
Clicking on a board square at startup could generate a call to playerCanMove before fics exists, popping up an error message. Fixed by adding a check that .fics exists first, as is done in other places within that file.
Clicking/holding the title bar at startup, before the spellcheck file loads, can no longer result in a crash to terminal due to a progressWindow grab attempt before it is viewable. There were other triggers for this same issue such as occasionally opening a menu at the right moment during startup. Kept hitting this once every so often, prior to adding the update idletasks before the grab.
2a) Finally, added a catch to the progressWindow's grab call. Found that there were still some scenarios at startup where the grab could still fail with "grab failed: another application has grab." For example, on my OS (linux) seemed that highlighting something in the terminal after starting scid would trigger this issue. Outside of startup I could not trigger this particular issue on any other grab calls.