Add checks for SDL return values.