Fixed platform resource handling, added null check.

Change-Id: I45ca22c4ea028e034742b6d10ac90a10da0e0f95
Merge "Fixed platform resource handling, added null check."