core: Display teardown: Improve error checking.
core: Display teardown: Improve error checking.

There was nothing wrong with this code beforehand but I added this while
trying to debug Display teardown and it could be useful in the future if
something does go wrong.

stb-tester/stb-tester,martynjarvis/stb-tester,martynjarvis/stb-tester,martynjarvis/stb-tester,LewisHaley/stb-tester,martynjarvis/stb-tester,martynjarvis/stb-tester,LewisHaley/stb-tester,martynjarvis/stb-tester,LewisHaley/stb-tester,LewisHaley/stb-tester,LewisHaley/stb-tester,stb-tester/stb-tester,LewisHaley/stb-tester,stb-tester/stb-tester,stb-tester/stb-tester,martynjarvis/stb-tester,LewisHaley/stb-tester