am c7412b3b: Minor bug fixes and add glError check.

Merge commit 'c7412b3b08d62c298dc7c3e5f369f406a3c0eac2' into eclair-mr2

* commit 'c7412b3b08d62c298dc7c3e5f369f406a3c0eac2':
  Minor bug fixes and add glError check.