forked from pool/emacs
17 lines
474 B
Diff
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,
|