Avoid problems with orientation
[drlaunch] / src / widget.py
index 1918367..11e4cf9 100755 (executable)
@@ -129,6 +129,10 @@ class DrlaunchPlugin(IconGrid, HomePluginItem, FremantleRotation):
        HomePluginItem.do_realize(self)
 
     def on_orientation_changed(self, orientation):
+       # Avoid bugs
+       if orientation==None or len(orientation)==0:
+           return
+
        # Get the first character of the string (l/p)
        o=orientation[0]
        self.setMode(o)