OSDN Git Service

Cache clone of the image as the original gets Disposed.
authorLatif Khalifa <latifer@streamgrid.net>
Tue, 5 Apr 2011 10:52:12 +0000 (10:52 +0000)
committerLatif Khalifa <latifer@streamgrid.net>
Tue, 5 Apr 2011 10:52:12 +0000 (10:52 +0000)
git-svn-id: https://radegast.googlecode.com/svn/trunk@814 f7a694da-4d33-11de-9ad6-1127a62b9fcd

Radegast/GUI/Dialogs/PrimWorkshop.cs

index 7dd816e..4b643a1 100644 (file)
@@ -401,6 +401,7 @@ namespace Radegast
                             }
 
                             img = LoadTGAClass.LoadTGA(new MemoryStream(mi.ExportTGA()));
+                            Textures[textureID] = (System.Drawing.Image)img.Clone();
                         }
                         gotImage.Set();
                     }
@@ -408,7 +409,6 @@ namespace Radegast
                 gotImage.WaitOne(30 * 1000, false);
                 if (img != null)
                 {
-                    Textures.Add(textureID, img);
                     texture = img;
                     Wireframe = false;
                     return true;