QtPyHammer-devs / QtPyHammer

python alternative to Valve's "Hammer World Editor"
GNU General Public License v3.0
35 stars 2 forks source link

Fix error when cancelling file select dialog #10

Closed ghost closed 4 years ago

ghost commented 4 years ago

When cancelling the file select dialog, QFileDialog::getOpenFileName(...) returns an empty path. Previously, the app would still try and load a map file from said path, causing an error. This patch adds a length check to prevent this from happening.

snake-biscuits commented 4 years ago

Thanks for picking up on this! The next update loads maps slightly differently so I’ll be sure to make sure to implement something similar in the next version too

snake-biscuits commented 4 years ago

I’ll be sure to release a hot fix for v0.0.4 in the meantime, as soon as I’m able to compile for windows