Browse Source

Throw exception when VBO cannot allocate enough memory in VBO::map().

vrld 13 years ago
parent
commit
6dee041a9d
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/modules/graphics/opengl/VertexBuffer.cpp

+ 2 - 0
src/modules/graphics/opengl/VertexBuffer.cpp

@@ -129,6 +129,8 @@ namespace opengl
 			throw love::Exception("VBO is already mapped!");
 			throw love::Exception("VBO is already mapped!");
 
 
 		mapped = malloc(getSize());
 		mapped = malloc(getSize());
+		if (!mapped)
+			throw love::Exception("Out of memory (oh the humanity!)");
 
 
 		return mapped;
 		return mapped;
 	}
 	}