MaslowCNC/GroundControl

GC will crash if trying to open "no file"

Closed this issue ยท 2 comments

If press select on the file open dialog box without having selected a file first, GC will crash.

In viewMenu.py (def load)

  def load(self, instance):
        '''
        
        Load A File (Any Type)
        
        Takes in a file path (from pop-up) and handles the file appropriately for the given file-type.
        
        '''
        
        filename = instance.selection[0]

When no file is selected, I suspect instance.selection is not a valid array and trying to access [0] results in "list index out of range". Not sure the best place to make the fix. in ViewMenu.py or fileBrowser.py

PR#740 addresses this, Ok to close?

Great fix! I think we're good to close this issue ๐ŸŽ‰ ๐Ÿ‘ ๐Ÿ‘