From 6fe1d4b9aad73e92a44459125294f4102753da35 Mon Sep 17 00:00:00 2001 From: David Vierra Date: Sat, 6 Feb 2016 23:44:21 -1000 Subject: [PATCH] Collect garbage after changing views in WorldList If the old view is reaped mid-frame, it calls makeCurrent and screws with the current rendering. --- src/mcedit2/worldlist.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mcedit2/worldlist.py b/src/mcedit2/worldlist.py index d3c40bd..56d820f 100644 --- a/src/mcedit2/worldlist.py +++ b/src/mcedit2/worldlist.py @@ -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()