UI: Coverity fixes.
ui Coverity fixes.
* This should fix all medium-impact defects.