aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Materials
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules/Materials')
-rw-r--r--OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs21
1 files changed, 17 insertions, 4 deletions
diff --git a/OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs b/OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs
index 822439f..2aea7f9 100644
--- a/OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs
+++ b/OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs
@@ -133,7 +133,7 @@ namespace OpenSim.Region.OptionalModules.Materials
133 if(m_changed.Count == 0) 133 if(m_changed.Count == 0)
134 return; 134 return;
135 135
136 if(forcedBackup) 136 if (forcedBackup)
137 { 137 {
138 toStore = new List<FaceMaterial>(m_changed.Keys); 138 toStore = new List<FaceMaterial>(m_changed.Keys);
139 m_changed.Clear(); 139 m_changed.Clear();
@@ -154,16 +154,29 @@ namespace OpenSim.Region.OptionalModules.Materials
154 m_changed.Remove(fm); 154 m_changed.Remove(fm);
155 } 155 }
156 } 156 }
157 }
157 158
158 if(toStore.Count > 0) 159 if(toStore.Count > 0)
159 Util.FireAndForget(delegate 160 {
161 if (forcedBackup)
160 { 162 {
161 foreach(FaceMaterial fm in toStore) 163 foreach (FaceMaterial fm in toStore)
162 { 164 {
163 AssetBase a = MakeAsset(fm, false); 165 AssetBase a = MakeAsset(fm, false);
164 m_scene.AssetService.Store(a); 166 m_scene.AssetService.Store(a);
165 } 167 }
166 }); 168 }
169 else
170 {
171 Util.FireAndForget(delegate
172 {
173 foreach (FaceMaterial fm in toStore)
174 {
175 AssetBase a = MakeAsset(fm, false);
176 m_scene.AssetService.Store(a);
177 }
178 });
179 }
167 } 180 }
168 } 181 }
169 182