From 7af1afb6df2f939b7dd6e2fc3df49eb1f7e38aa8 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Tue, 11 Nov 2008 02:24:33 +0000 Subject: Fix a nullref in attachment packing --- OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs index a4801ad..bfa9763 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs @@ -323,7 +323,14 @@ namespace OpenSim.Region.Environment.Scenes foreach (string assembly in assemblies) { string fn = Path.GetFileName(assembly); + if (fn == String.Empty) + continue; + FileInfo fi = new FileInfo(assembly); + + if (fi == null) + continue; + Byte[] data = new Byte[fi.Length]; FileStream fs = File.Open(assembly, FileMode.Open, FileAccess.Read); -- cgit v1.1