Fix segfault removing theme assets

Change-Id: I4827eb6e2b186547f1df6f9bbd048fb1e3a29890