aboutsummaryrefslogtreecommitdiffstats
path: root/compositor
diff options
context:
space:
mode:
authorTim Wiederhake <twied@gmx.net>2011-01-25 12:01:00 +0100
committerKristian Høgsberg <krh@bitplanet.net>2011-01-25 08:37:06 -0500
commit70af98c57614307a427843b2f0bd6d99ed187c58 (patch)
treeb5ec0437fad27a67c8dd912d44c1e8dd5e1db177 /compositor
parentAdd specific versions to build dependencies (diff)
downloadwayland-70af98c57614307a427843b2f0bd6d99ed187c58.tar
wayland-70af98c57614307a427843b2f0bd6d99ed187c58.tar.gz
wayland-70af98c57614307a427843b2f0bd6d99ed187c58.tar.bz2
wayland-70af98c57614307a427843b2f0bd6d99ed187c58.tar.lz
wayland-70af98c57614307a427843b2f0bd6d99ed187c58.tar.xz
wayland-70af98c57614307a427843b2f0bd6d99ed187c58.tar.zst
wayland-70af98c57614307a427843b2f0bd6d99ed187c58.zip
fix tty_destroy
fixes segfault when active tty could not be opened fixes copy-paste mistake.
Diffstat (limited to 'compositor')
-rw-r--r--compositor/tty.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/compositor/tty.c b/compositor/tty.c
index 70c319d..6314b14 100644
--- 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,