TheJayMann-duplicate / DQ9MapTool

A tool to view randomly generated maps and treasure chest items from Dragon Quest IX
2 stars 1 forks source link

Leaving the level textbox empty crashes on search #2

Closed TheJayMann-duplicate closed 13 years ago

TheJayMann-duplicate commented 13 years ago

If the level box remains empty while searching for the map, it crashes the application. This is because the search button attempts to parse a number from the textbox, and if the textbox is not a number, the attempt throws an uncaught exception resulting in a crash. A fix would be to validate the textbox as only containing an integer between 1-100, and possibly falling back on TryParse, which does not throw exceptions.