Crash when cancelling db connection dialog

Fixed a crash when the Dialog to change the database connection was cancelled.
dev
Peery 1 year ago
parent 2c66002d64
commit c6ed71aa93
Signed by: pandro
SSH Key Fingerprint: SHA256:iBUZSuDxqYr4hYpe9U3BA9NJmXKpbGt4H0S8hUwIbrA

@ -947,7 +947,7 @@ class ImporterWindow(ArtnetMainWindow):
dialog.ui.port_line_edit.setText(str(prev_db_data["port"]))
db_data: dict = dialog.exec_()
if len(db_data.keys()) == 0:
if db_data is None or len(db_data.keys()) == 0:
return
try:
self.main.change_db_connection(host=db_data["host"], port=db_data["port"],

Loading…
Cancel
Save