For certain socket types, such as object or material, the name of the
item is not obtained correctly leading the tooltip to display random
non-character memory values as text.
This patch fixes the bug with minimal changes.
Bug introduced in: rB47276b847017
