Subject: bug#56372: 29.0.50; [PATCH] Avoid BadMatch X11 error

From: Po Lu <[email-masked]>
Date: Mon, 04 Jul 2022 18:58:43 +0800

Lars Ingebrigtsen <[email-masked]> writes:

> Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text
> editors" <[email-masked]> writes:
>
>> That piece of code is already inside "if (dpyinfo)"
>
> Indeed.  And aren't we testing for dpyinfo twice already in that code?
>
> Unless I'm misreading, it's:
>
>   /* If DPYINFO is null, this means we didn't open the display in the
>      first place, so don't try to close it.  */
>   if (dpyinfo)
>     {
> ... no code here that sets dpyinfo ...
> [...]
>       if (dpyinfo->terminal == terminal_list
> 	  && !terminal_list->next_terminal)
> 	{
> 	  fprintf (stderr, "%s\n", error_msg);
>
> 	  if (!ioerror && dpyinfo)
> 	    {
>
> That && dpyinfo seems redundant?

Yes, sorry.  That's left over from another piece of code.