Browse Source

fixed crash on graph draw without data

subDesTagesMitExtraKaese 4 years ago
parent
commit
87bab8b9f7
1 changed files with 2 additions and 1 deletions
  1. 2 1
      raspberry-pi/gui/mainWindow.py

+ 2 - 1
raspberry-pi/gui/mainWindow.py

@@ -31,7 +31,8 @@ class MainWindow(tk.Frame):
       name, data = self.up_queue.get()
       if name == "ac_data":
         ac_data.append(data)
-    self.graph.update([ac_data])
+    if len(ac_data) > 0:
+      self.graph.update([ac_data])
 
     if self.popup:
       self.popup.update()