Resolves: #i121410# Secured usage of pTextGroup

(cherry picked from commit 966c38038352a347f25d690f18a2059d6f78b9fa)

Change-Id: Ibbd68e8c102f2d80ea5b7610b9a97704a282e6ea
(cherry picked from commit 553f88e3d65fd25f645c22589de575924c3879fc)