Make sure the pixbuf loader is closed before when the state instance
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 12 Sep 2004 09:38:05 +0000 (09:38 +0000)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 12 Sep 2004 09:38:05 +0000 (09:38 +0000)
is destroyed. GTK+ complains otherwise.

src/gkofoto/gkofoto/imagepreloader.py

index d133c42..6c0a128 100644 (file)
@@ -108,6 +108,9 @@ class ImagePreloader(object):
         # Discard old preloaded images.
         for filename in self.__preloadStates.keys():
             if not filename in filenames:
+                pixbufLoader = self.__preloadStates[filename].pixbufLoader
+                if pixbufLoader:
+                    pixbufLoader.close()
                 del self.__preloadStates[filename]
 
         # Preload the new images.