projects
/
ccbs
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6e40dbd
)
Don't crash when we have no screens.
author
Steinar H. Gunderson
<sesse@samfundet.no>
Sat, 19 Feb 2005 17:02:19 +0000
(17:02 +0000)
committer
Steinar H. Gunderson
<sesse@samfundet.no>
Sat, 19 Feb 2005 17:02:19 +0000
(17:02 +0000)
bigscreen/ccbs_bigscreen.cpp
patch
|
blob
|
history
diff --git
a/bigscreen/ccbs_bigscreen.cpp
b/bigscreen/ccbs_bigscreen.cpp
index
dfb025f
..
fbbc0aa
100644
(file)
--- a/
bigscreen/ccbs_bigscreen.cpp
+++ b/
bigscreen/ccbs_bigscreen.cpp
@@
-51,11
+51,13
@@
void main_loop(pqxx::connection &conn)
memset(framebuf, 0, 800*600*4);
- if (screens[0]->check_invalidated()) {
- screens[0]->draw(screenbuf);
+ if (screens.size() > 0) {
+ if (screens[0]->check_invalidated()) {
+ screens[0]->draw(screenbuf);
+ }
+
+ memcpy(framebuf, screenbuf, 800*600*4);
}
-
- memcpy(framebuf, screenbuf, 800*600*4);
ptc_update(framebuf);
conn.await_notification(0, 50000);