projects
/
profile
/
ivi
/
wayland.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
238515d
)
fix tty_destroy
author
Tim Wiederhake
<twied@gmx.net>
Tue, 25 Jan 2011 11:01:00 +0000
(12:01 +0100)
committer
Kristian Høgsberg
<krh@bitplanet.net>
Tue, 25 Jan 2011 13:37:06 +0000
(08:37 -0500)
fixes segfault when active tty could not be opened
fixes copy-paste mistake.
compositor/tty.c
patch
|
blob
|
history
diff --git
a/compositor/tty.c
b/compositor/tty.c
index
70c319d
..
6314b14
100644
(file)
--- a/
compositor/tty.c
+++ b/
compositor/tty.c
@@
-148,12
+148,12
@@
tty_create(struct wlsc_compositor *compositor)
void
tty_destroy(struct tty *tty)
{
- int ret;
+ if(!tty)
+ return;
- ret = ioctl(tty->fd, KDSETMODE, KD_TEXT);
- if (ret)
+ if (ioctl(tty->fd, KDSETMODE, KD_TEXT))
fprintf(stderr,
- "failed to set KD_
GRAPHICS
mode on tty: %m\n");
+ "failed to set KD_
TEXT
mode on tty: %m\n");
if (tcsetattr(tty->fd, TCSANOW, &tty->terminal_attributes) < 0)
fprintf(stderr,