https://bugs.winehq.org/show_bug.cgi?id=40767
--- Comment #5 from Miklós Máté mtmkls@gmail.com --- I just sent out patches to fix this.
The problem was that due to a typo the gl_drawable structure wasn't cleaned up properly, but it wasn't an issue until I added GLX 1.3 support :) With GLX 1.3 this meant that the glx window wasn't destroyed along with the x window. As it turned out, xlib aggressively reuses window ids, and thus Wine ended up creating a glx window for a newly created x window, but the glx window of the previous x window with the same id was still around. Mesa caught this by crashing.