Add null check for thread name creation

Previously we didn't check for null which could result in check jni
failures if we tried to throw another OOM in the next allocation.

Bug: 18297817

(cherry picked from commit a7ade888ab99b1453571d14c41d4a0322c400fcd)

Change-Id: Ideef46f4900e546e81fbd9a5225c06698f36e9ac
1 file changed