fix a null pointer in doTOpic