Stop RotateScreen from crashing when it has no subscreens.
authorSteinar H. Gunderson <sesse@samfundet.no>
Mon, 28 Feb 2005 23:51:42 +0000 (23:51 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Mon, 28 Feb 2005 23:51:42 +0000 (23:51 +0000)
bigscreen/rotatescreen.cpp

index 96a3ebc..2ae7822 100644 (file)
@@ -32,6 +32,12 @@ bool RotateScreen::check_invalidated()
 void RotateScreen::draw(unsigned char *buf)
 {
        bool force = false;
+
+       if (subscreens.size() == 0) {
+               valid = true;
+               gettimeofday(&last_update, NULL);
+               return;
+       }
        
        // if we're in a fade, complete it before doing anything else
        if (in_fade) {