gl: Check for errors after every call.