My comment about comparing floats remains. You should probably verify that size.height > 0 instead of a direct comparison