Moved a line.
Prevents a possible invalid mem or pointer deref panic.