[#10126] by Tim Eisenhuth: Correctly check return data