That has nothing to do with why he wasn't hurt. She was hurt because her head hit the wall, Shikamaru was no where near the wall, so he didn't get hurt.