FRC2706 / 2019-2706-Robot-Code

The main robot code for the FIRST 2019 challenge: Deep Space
MIT License
2 stars 0 forks source link

Possible double-initialization of subsystems #36

Closed ryanlarkin closed 5 years ago

ryanlarkin commented 5 years ago

Steps to reproduce:

kevlam2706 commented 5 years ago

The init() call is public and could be called outside of the getInstance method.

KyleRAnderson commented 5 years ago

@greyingjay that was intentional so that at Robot initialization the Robot could initialize the subsystem.

The fix I've worked out is a simple null check in the init() method.