diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index 3bdee6cade0e18e86a0f59cad4a44f91998755e7..2d3762135a23296850676aa71e8f14fe8440af50 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -1113,24 +1113,27 @@ void LLImageGL::generateTextures(LLTexUnit::eTextureType type, S32 numTextures,
 // static
 void LLImageGL::deleteTextures(LLTexUnit::eTextureType type, S32 numTextures, U32 *textures, bool immediate)
 {
-	for (S32 i = 0; i < numTextures; ++i)
-	{ //remove texture from VRAM by setting its size to zero
-		gGL.getTexUnit(0)->bindManual(type, textures[i]);
+	if (gGLManager.mInited)
+	{
+		for (S32 i = 0; i < numTextures; ++i)
+		{ //remove texture from VRAM by setting its size to zero
+			gGL.getTexUnit(0)->bindManual(type, textures[i]);
 
-		if (type == LLTexUnit::TT_CUBE_MAP)
-		{
-			glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
-			glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_Y, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
-			glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_Z, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
-			glTexImage2D(GL_TEXTURE_CUBE_MAP_NEGATIVE_X, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
-			glTexImage2D(GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
-			glTexImage2D(GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
-		}
-		else
-		{
-			glTexImage2D(LLTexUnit::getInternalType(type), 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+			if (type == LLTexUnit::TT_CUBE_MAP)
+			{
+				glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+				glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_Y, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+				glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_Z, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+				glTexImage2D(GL_TEXTURE_CUBE_MAP_NEGATIVE_X, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+				glTexImage2D(GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+				glTexImage2D(GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+			}
+			else
+			{
+				glTexImage2D(LLTexUnit::getInternalType(type), 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+			}
+			sDeadTextureList[type].push_back(textures[i]);
 		}
-		sDeadTextureList[type].push_back(textures[i]);
 	}
 	
 	/*if (immediate)
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 6a218e7734358889ddca7f039eaebfa4deecc327..0e037fdd21b65155ff38974569dd24c6857e59db 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -142,16 +142,19 @@ U32 LLVBOPool::genBuffer()
 
 void LLVBOPool::deleteBuffer(U32 name)
 {
-	LLVertexBuffer::unbind();
+	if (gGLManager.mInited)
+	{
+		LLVertexBuffer::unbind();
 
-	glBindBufferARB(mType, name);
-	glBufferDataARB(mType, 0, NULL, mUsage);
+		glBindBufferARB(mType, name);
+		glBufferDataARB(mType, 0, NULL, mUsage);
 
-	llassert(std::find(mGLNamePool.begin(), mGLNamePool.end(), name) == mGLNamePool.end());
+		llassert(std::find(mGLNamePool.begin(), mGLNamePool.end(), name) == mGLNamePool.end());
 
-	mGLNamePool.push_back(name);
+		mGLNamePool.push_back(name);
 
-	LLVertexBuffer::unbind();
+		LLVertexBuffer::unbind();
+	}
 }