Fix race condition in GetPreResolvedStrings

DexCache::VisitReferences had a race condition where a null pointer
could be accessed if there was another concurrent caller doing
ClearPreResolvedStrings.

Fix is to add an extra null check that prevents the race.

Bug: 152716138
Test: test-art-host
Change-Id: Ib447ce689e23f7c20d4cda8b457abeb89ade9291
1 file changed