Fix SDL Gamepad Remove Crash

Reporter: RobertBColton  |  Status: open  |  Last Modified: December 19, 2020, 08:16:16 PM

This fixes a crash cleaning up gamepads at exit. You have to combine this with #2175 to get rid of the out of bounds issues. Then the issue remaining is just trying to close an already closed joystick if you already unplugged the joystick. All I had to do here was null the pointers and check if they are null like a good developer.
codecov[bot]  
>Codecov Report

Merging #2172 (30c2d3a) into master (e273f89) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2172      +/-   ##
==========================================
- Coverage   32.89%   32.88%   -0.01%     
==========================================
  Files         197      197              
  Lines       19062    19065       +3     
==========================================
  Hits         6270     6270              
- Misses      12792    12795       +3     
Impacted Files Coverage Δ
ENIGMAsystem/SHELL/Platforms/SDL/Gamepad.cpp 5.51% <0.00%> (-0.14%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e273f89...30c2d3a. Read the comment docs.

Please sign in to post comments, or you can view this issue on GitHub.