X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=select.c;h=dde83a38279a84bacbe78e5c6aa17350c7eeac05;hb=6b280803f0ab95a0bad13f92bb868726f4b085cb;hp=93f201233af4d8f823ad98cece294085cdea0d05;hpb=16d63e77a35ae097b9d329c1a1693edf5b29409e;p=ir-tcl-moved-to-github.git diff --git a/select.c b/select.c index 93f2012..dde83a3 100644 --- a/select.c +++ b/select.c @@ -5,7 +5,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: select.c,v $ - * Revision 1.1 1996-08-20 09:33:23 adam + * Revision 1.2 1996-09-13 10:51:48 adam + * Bug fix: ir_tcl_select_set called Tcl_GetFile at disconnect. + * + * Revision 1.1 1996/08/20 09:33:23 adam * Tcl7.5 Generic file handling. * */ @@ -67,6 +70,8 @@ void ir_tcl_select_set (void (*f)(ClientData clientData, int r, int w, int e), } if (!*sp) { + if (!f) + return; *sp = ir_tcl_malloc (sizeof(**sp)); (*sp)->next = NULL; (*sp)->fd = fd; @@ -116,6 +121,8 @@ void ir_tcl_select_set (void (*f)(ClientData clientData, int r, int w, int e), } if (!sp) { + if (!f) + return; sp = ir_tcl_malloc (sizeof(*sp)); sp->next = sel_proc_list; sel_proc_list = sp;