add missing background color
[enigma2.git] / lib / python / Components / Element.py
index 884c87d393d920f0b1bec8a2e012be0b80d25e0e..880274b423940ee761435d5c3ef964e45a21b55f 100644 (file)
@@ -29,7 +29,10 @@ class Element:
                # we should not disconnect from upstream if
                # there are still elements depending on us.
                assert len(self.downstream_elements) == 0, "there are still downstream elements left"
-               self.source.disconnectDownstream(self)
+               
+               # Sources don't have a source themselves. don't do anything here.
+               if self.source is not None:
+                       self.source.disconnectDownstream(self)
        
        def disconnectDownstream(self, downstream):
                self.downstream_elements.remove(downstream)