diff --git a/openlp/core/widgets/views.py b/openlp/core/widgets/views.py index e80e46cf4..a1d065307 100644 --- a/openlp/core/widgets/views.py +++ b/openlp/core/widgets/views.py @@ -210,7 +210,10 @@ class ListPreviewWidget(QtWidgets.QTableWidget, RegistryProperties): pixmap = QtGui.QPixmap(str(slide['image'])) else: pixmap = QtGui.QPixmap(str(slide['path'])) - pixmap_ratio = pixmap.width() / pixmap.height() + if pixmap.height() > 0: + pixmap_ratio = pixmap.width() / pixmap.height() + else: + pixmap_ratio = 1 label.setPixmap(pixmap) container = QtWidgets.QWidget() layout = AspectRatioLayout(container, pixmap_ratio)