Avoid calling GetPointer() multiple times in a row
Merge pull request #7216 from chinhodado/patch-1

Avoid calling GetPointer() multiple times in a row