summaryrefslogtreecommitdiff
path: root/src/nsselect.m
diff options
context:
space:
mode:
Diffstat (limited to 'src/nsselect.m')
-rw-r--r--src/nsselect.m4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nsselect.m b/src/nsselect.m
index f4713cb5e10..038849c0aed 100644
--- a/src/nsselect.m
+++ b/src/nsselect.m
@@ -429,7 +429,9 @@ On Nextstep, TERMINAL is unused. */)
id pb;
NSArray *types;
- check_window_system (NULL);
+ if (!window_system_available (NULL))
+ return Qnil;
+
CHECK_SYMBOL (selection);
if (EQ (selection, Qnil)) selection = QPRIMARY;
if (EQ (selection, Qt)) selection = QSECONDARY;