]> git.sesse.net Git - ccbs/commitdiff
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 96a3ebc7bad1137f957e1971642f611ddd34247e..2ae782218516d9024abd8f8ff3a867da4c100310 100644 (file)
@@ -32,6 +32,12 @@ bool RotateScreen::check_invalidated()
 void RotateScreen::draw(unsigned char *buf)
 {
        bool force = false;
 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) {
        
        // if we're in a fade, complete it before doing anything else
        if (in_fade) {