[PATCH powerdebug] Check null pointer before dereferencing