spuder / All-Spark-Cube

Software to control an RGB led cube
20 stars 6 forks source link

3d - Check for null on file import #38

Closed spuder closed 12 years ago

spuder commented 12 years ago

If you call the load strings with select input and then the user clicks cancel, you will get bad errors in the code (null pointer exception, infinite loops)

loadStrings(selectInput());

Add a check making sure that loadStrings did not return null before executing any logic. The forums have many examples of how to implement this.

This is a low because we can just tell ian not to click cancel, but rather always select the file.