aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan Djärv2012-10-18 20:54:37 +0200
committerJan Djärv2012-10-18 20:54:37 +0200
commit1a9327d5cd660040a282ab595509c16fe90f63a2 (patch)
treee61e620c38b55d57106d359f446e410643753177 /src
parentafb8aa2482db730a8ebdabe314c320c01dda383c (diff)
downloademacs-1a9327d5cd660040a282ab595509c16fe90f63a2.tar.gz
emacs-1a9327d5cd660040a282ab595509c16fe90f63a2.zip
* nsterm.m (ns_select): Check writefds before call to
FD_ISSET. Fixes: debbugs:12668
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/nsterm.m6
2 files changed, 8 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 6fece1e72c5..f1e3a99dbc6 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12012-10-18 Jan Djärv <jan.h.d@swipnet.se>
2
3 * nsterm.m (ns_select): Check writefds before call to
4 FD_ISSET (Bug#12668).
5
12012-10-18 Daniel Colascione <dancol@dancol.org> 62012-10-18 Daniel Colascione <dancol@dancol.org>
2 7
3 * alloc.c (NSTATICS): Increase from 0x650 to 0x1000 8 * alloc.c (NSTATICS): Increase from 0x650 to 0x1000
diff --git a/src/nsterm.m b/src/nsterm.m
index dfc84db50f7..a4eaad47ac1 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -3443,10 +3443,10 @@ ns_select (int nfds, fd_set *readfds, fd_set *writefds,
3443 3443
3444/* NSTRACE (ns_select); */ 3444/* NSTRACE (ns_select); */
3445 3445
3446 for (k = 0; readfds && k < nfds+1; k++) 3446 for (k = 0; k < nfds+1; k++)
3447 { 3447 {
3448 if (FD_ISSET(k, readfds)) ++nr; 3448 if (readfds && FD_ISSET(k, readfds)) ++nr;
3449 if (FD_ISSET(k, writefds)) ++nr; 3449 if (writefds && FD_ISSET(k, writefds)) ++nr;
3450 } 3450 }
3451 3451
3452 if (NSApp == nil 3452 if (NSApp == nil