thermal: Fix thermal crash when debugging property is enabled

Bug: 240585337
Test: Verified C10, and O6, no crash happened when dumping lshal debug with vendor.disable.thermal.control enabled.

Change-Id: If2bf55d6f9ee34fa422abffe8114696e6b14cd0a
2 files changed