Commits

Bart van Strien  committed 8c64a0c

Make love.graphics.setCanvas(nil) error

This helps detect typoes, setCanvas() still works as before

  • Participants
  • Parent commits c43e027

Comments (0)

Files changed (1)

File src/modules/graphics/opengl/wrap_Graphics.cpp

 	// discard stencil testing
 	instance->discardStencil();
 
-	// called with nil or none -> reset to default buffer
-	if (lua_isnoneornil(L,1))
+	// called with none -> reset to default buffer
+	// nil is an error, to help people with typoes
+	if (lua_isnone(L,1))
 	{
 		Canvas::bindDefaultCanvas();
 		return 0;