From 6340fa0aab14f03c6ed2c76e027740be49b85861 Mon Sep 17 00:00:00 2001
From: Sean Dague
Date: Tue, 11 Mar 2008 21:37:35 +0000
Subject: Ensure resolution of mantis 113

---
 OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs b/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs
index d08ef8b..2ca49b5 100644
--- a/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs
+++ b/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs
@@ -137,10 +137,12 @@ namespace OpenSim.Framework.Data.SQLite
             string temporary = asset.Temporary ? "Temporary" : "Stored";
             string local = asset.Local ? "Local" : "Remote";
 
+            int assetLength = (asset.Data != null) ? asset.Data.Length : 0;
+
             m_log.Info("[SQLITE]: " +
                                      string.Format("Loaded {6} {5} Asset: [{0}][{3}/{4}] \"{1}\":{2} ({7} bytes)",
                                                    asset.FullID, asset.Name, asset.Description, asset.Type,
-                                                   asset.InvType, temporary, local, asset.Data.Length));
+                                                   asset.InvType, temporary, local, assetLength));
         }
 
         public bool ExistsAsset(LLUUID uuid)
-- 
cgit v1.1