From f039fa98efedc91965338ef53624279f99914205 Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Mon, 30 Nov 2009 17:02:38 -0600
Subject: [PATCH] Fix for silly crash due to LLPrimitive having 0 texture
 entries.

---
 indra/llmath/llvolume.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index 1d36da7f525..858bd9edeab 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -1692,9 +1692,10 @@ LLVolume::LLVolume(const LLVolumeParams &params, const F32 detail, const BOOL ge
 
 	mGenerateSingleFace = generate_single_face;
 
+	generate();
+	
 	if (mParams.getSculptID().isNull() && params.getSculptType() == LL_SCULPT_TYPE_NONE)
 	{
-		generate();
 		createVolumeFaces();
 	}
 }
-- 
GitLab