SHA256
1
0
forked from pool/emacs
emacs/emacs-24.1-xgselect.patch
2012-06-28 09:17:09 +00:00

17 lines
474 B
Diff

--- src/xgselect.c
+++ src/xgselect.c 2012-06-27 11:58:47.756081195 +0000
@@ -58,7 +58,12 @@ xg_select (int max_fds, SELECT_TYPE *rfd
gfds = xpalloc (0, &gfds_size, n_gfds - gfds_size, INT_MAX,
sizeof *gfds);
}
-
+ else if (!gfds)
+ {
+ gfds_size = 1;
+ gfds = xmalloc (sizeof (*gfds));
+ }
+
n_gfds = g_main_context_query (context,
G_PRIORITY_LOW,
&tmo_in_millisec,