Skip to content

Commit

Permalink
fix crash on menu buttons without device selected, fixes #235 (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
jziolkowski committed Sep 15, 2024
1 parent a2ebfb5 commit 148c5b5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tdmgr/GUI/devices.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
from json import dumps
from typing import Optional

from PyQt5.QtCore import QDir, QSortFilterProxyModel, Qt, QUrl, pyqtSignal
from PyQt5.QtGui import QColor, QIcon
Expand Down Expand Up @@ -62,7 +63,7 @@ def __init__(self, parent, *args, **kwargs):
self.mqtt = parent.mqtt
self.env = parent.env

self.device: TasmotaDevice
self.device: Optional[TasmotaDevice] = None
self.idx = None

self.nam = QNetworkAccessManager()
Expand Down

0 comments on commit 148c5b5

Please sign in to comment.