From: Steinar H. Gunderson Date: Mon, 28 Feb 2005 23:51:42 +0000 (+0000) Subject: Stop RotateScreen from crashing when it has no subscreens. X-Git-Url: https://git.sesse.net/?p=ccbs;a=commitdiff_plain;h=bb5b7a03fb40583ab3f7cfeabe17739c970d8c69;hp=8240e621177bc46692cdf538ad66baa8e296a220 Stop RotateScreen from crashing when it has no subscreens. --- diff --git a/bigscreen/rotatescreen.cpp b/bigscreen/rotatescreen.cpp index 96a3ebc..2ae7822 100644 --- a/bigscreen/rotatescreen.cpp +++ b/bigscreen/rotatescreen.cpp @@ -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) {