Fix crash caused by referencing an unbound local variable. (#128)
Co-authored-by: Eric Patey <>
This commit is contained in:
@@ -49,11 +49,16 @@ def check_image_stretch_and_center(modified_ppt, original_ppt):
|
||||
|
||||
the_image = original_slide_images[0]
|
||||
|
||||
the_modified_image = None
|
||||
|
||||
# Get the images that modified in width and height
|
||||
for modified_image in modified_slide_images:
|
||||
if the_image.image.blob == modified_image.image.blob:
|
||||
the_modified_image = modified_image
|
||||
|
||||
if the_modified_image is None:
|
||||
return 0.
|
||||
|
||||
if (abs(the_modified_image.width - original_pres.slide_width) > Inches(0.5) or
|
||||
abs(the_modified_image.height - original_pres.slide_height) > Inches(0.5) or
|
||||
abs(the_modified_image.left - (original_pres.slide_width - the_modified_image.width) / 2) > Inches(0.5) or
|
||||
|
||||
Reference in New Issue
Block a user