Merge "Improve error detection in HardwareRenderer.draw(). Bug #3280872"