### ImageMagick version

7.1.1-17

### Operating system

Linux

### Operating system, version and so on

Ubuntu 22.04

### Description

`Magick::Image::display` works only once

The second time a number of pointers in `windows` will be `null`: https://github.com/ImageMagick/ImageMagick/blob/66ceff0fde288813570dfb8da5c1cfa647e999d5/MagickCore/display.c#L14609

`visual_info` is initialized correctly only when the X subsystem is initialized, it is `null` on the subsequent calls.

### Steps to Reproduce

```cpp
Magick::Image im("50x50", "black");
im.display();
// close the window via the window manager
im.display();
```

### Images

_No response_
`Magick::Image::display` works only once
This is a GitHub Issue
repo:ImageMagick
owner:ImageMagick
Title : `Magick::Image::display` works only once
Issue date:

--- start body ---
### ImageMagick version

7.1.1-17

### Operating system

Linux

### Operating system, version and so on

Ubuntu 22.04

### Description

`Magick::Image::display` works only once

The second time a number of pointers in `windows` will be `null`: https://github.com/ImageMagick/ImageMagick/blob/66ceff0fde288813570dfb8da5c1cfa647e999d5/MagickCore/display.c#L14609

`visual_info` is initialized correctly only when the X subsystem is initialized, it is `null` on the subsequent calls.

### Steps to Reproduce

```cpp
Magick::Image im("50x50", "black");
im.display();
// close the window via the window manager
im.display();
```

### Images

_No response_
--- end body ---
