Collect garbage after changing views in WorldList

If the old view is reaped mid-frame, it calls makeCurrent and screws
with the current rendering.
This commit is contained in:
David Vierra 2016-02-06 23:44:21 -10:00
parent fbec27a9e0
commit 6fe1d4b9aa

View File

@ -431,6 +431,10 @@ class WorldListWidget(QtGui.QDialog, Ui_worldList):
self.chunkLoader = None
# ensure WorldView gets freed now and not later
# if it is freed later, it will call makeCurrent and ruin another view's render
import gc; gc.collect()
def hide(self):
self.removeWorldView()
super(WorldListWidget, self).hide()