Court rules officer’s fatal shooting justified