# HG changeset patch # User Richard M. Stallman # Date 1049661306 0 # Node ID d89a8e99c73b1af41753758a213bc11e1c847ded # Parent 674bfa5d582dd48f0180e47d59903b800b6d1a90 (x_handle_selection_request): Move UNGCPRO to very end. diff -r 674bfa5d582d -r d89a8e99c73b src/xselect.c --- a/src/xselect.c Sun Apr 06 20:33:59 2003 +0000 +++ b/src/xselect.c Sun Apr 06 20:35:06 2003 +0000 @@ -425,6 +425,9 @@ CHECK_SYMBOL (target_type); handler_fn = Fcdr (Fassq (target_type, Vselection_converter_alist)); + /* gcpro is not needed here since nothing but HANDLER_FN + is live, and that ought to be a symbol. */ + if (!NILP (handler_fn)) value = call3 (handler_fn, selection_symbol, (local_request ? Qnil : target_type), @@ -837,8 +840,6 @@ DONE: - UNGCPRO; - /* Let random lisp code notice that the selection has been asked for. */ { Lisp_Object rest; @@ -847,6 +848,8 @@ for (; CONSP (rest); rest = Fcdr (rest)) call3 (Fcar (rest), selection_symbol, target_symbol, successful_p); } + + UNGCPRO; } /* Handle a SelectionClear event EVENT, which indicates that some