Skip to content

wgl: Check for stw_device->screen before trying to destroy it

Jesse Natalie requested to merge jenatali/mesa:stw-cleanup into main

The stw_device and its screen are set up independently. It's possible to have a device without a screen if the DLL is loaded but never called into, since DllMain for PROCESS_ATTACH sets up the stw_device, but the screen is initialized later on the first call to get pixel formats. If the DLL is loaded and then unloaded, don't crash.

Cc: mesa-stable

Fixes Microsoft-internal bug 47049489.

Merge request reports