summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Cameron <brian.cameron@sun.com>2007-11-14 00:56:17 +0000
committerBrian Cameron <bcameron@src.gnome.org>2007-11-14 00:56:17 +0000
commitcd9213aa57dc69bd218ea5b7fbfd061a96510800 (patch)
treea1a599619c4d16ac235e0dd00399bada76da3194
parent66f98c10cc381ef895acfddb75625d0c493aca1f (diff)
downloadgdm-cd9213aa57dc69bd218ea5b7fbfd061a96510800.tar.gz
If gdm_get_current_vtnum is called with a NULL display, just return -1.
2007-11-13 Brian Cameron <brian.cameron@sun.com> * daemon/getvt.c: If gdm_get_current_vtnum is called with a NULL display, just return -1. svn path=/branches/gnome-2-20/; revision=5504
-rw-r--r--ChangeLog5
-rw-r--r--daemon/getvt.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index aaa94e43..de4e0477 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-11-13 Brian Cameron <brian.cameron@sun.com>
+
+ * daemon/getvt.c: If gdm_get_current_vtnum is called with a NULL
+ display, just return -1.
+
2007-11-07 Brian Cameron <brian.cameron@sun.com>
* common/gdm-common.[ch], daemon/misc.c, daemon/gdm-xdmcp-manager.c:
diff --git a/daemon/getvt.c b/daemon/getvt.c
index 569ff773..a4b441e1 100644
--- a/daemon/getvt.c
+++ b/daemon/getvt.c
@@ -56,6 +56,9 @@ gdm_get_current_vtnum (Display *display)
unsigned char *buf;
unsigned long num;
+ if (display == NULL)
+ return -1;
+
prop = XInternAtom (display, "XFree86_VT", False);
if (prop == None) {
gdm_debug ("no XFree86_VT atom\n");