segfault on closed window
phebert5009 opened this issue · comments
After calling window.close() either window.clear(), window.draw(Drawable), or window.display() causes a segmentation fault (I'm using ubuntu 18.04 and dub, I don't remember when I compiled DSFMLC).
An easy workaround is to use if(!window.isOpen) break;
after the event loop or move the event loop to the end of the main loop.
What version of DSFML are you using?
2.1.1
I'll double check this, but it is very likely that it was fixed in master which is an in progress 2.4 version.
I'm actively working towards the next release, so stay tuned.
I just tested this on Arch with DSFML 2.4 and I didn't get any segfaults. I had a call to window.clear()
, window.display()
, and more than one window.draw()
between them.
DSFML 2.4 release is getting close, so hold tight. For now, I'll close this issue.