projects
/
profile
/
ivi
/
weston-ivi-shell.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
86653ed
)
terminal: fix crashing when terminal size is < 0
author
Tiago Vignatti
<tiago.vignatti@nokia.com>
Mon, 10 Jan 2011 17:30:04 +0000
(19:30 +0200)
committer
Kristian Høgsberg
<krh@bitplanet.net>
Mon, 10 Jan 2011 19:16:42 +0000
(14:16 -0500)
Just skip drawing when width or height is less than zero.
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
clients/terminal.c
patch
|
blob
|
history
diff --git
a/clients/terminal.c
b/clients/terminal.c
index
4bfb06b
..
1c7cbbf
100644
(file)
--- a/
clients/terminal.c
+++ b/
clients/terminal.c
@@
-838,6
+838,10
@@
terminal_draw(struct terminal *terminal)
(int32_t) terminal->extents.max_x_advance;
height = (rectangle.height - 2 * terminal->margin) /
(int32_t) terminal->extents.height;
+
+ if (width < 0 || height < 0)
+ return;
+
terminal_resize(terminal, width, height);
window_draw(terminal->window);