Core/Misc: Fixed some more issues found by static code analysis tools.
Merge pull request #10819 from Ascathor/master

Core/Misc: Fixed some more issues found by static code analysis tools.