Skip to content

Commit

Permalink
Avoid division by zero
Browse files Browse the repository at this point in the history
  • Loading branch information
ManInFez committed Apr 11, 2019
1 parent d3f5647 commit 28d2be6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/python/ert_gui/ert_splash.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ def drawContents(self, painter):

image_width = self.splash_image.width()
image_height = self.splash_image.height()
aspect = float(image_width) / float(image_height)
aspect = 1.0
if image_height:
aspect = float(image_width) / float(image_height)

scaled_height = h - 2 * margin
scaled_width = scaled_height * aspect
Expand Down

0 comments on commit 28d2be6

Please sign in to comment.