test_dnd: Check return value of strchr it can be NULL.
test_dnd: Check return value of strchr it can be NULL.

This fixes coverity CID 1152899 and 1152898.

rvandegrift/elementary,tasn/elementary,FlorentRevest/Elementary,FlorentRevest/Elementary,rvandegrift/elementary,tasn/elementary,FlorentRevest/Elementary,tasn/elementary,rvandegrift/elementary,FlorentRevest/Elementary,tasn/elementary,tasn/elementary,rvandegrift/elementary