From 959cde78b7421ad22cd8d4e893fba5a9a792829c Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Tue, 6 Jun 2017 23:00:50 -0400 Subject: [PATCH] Fix #55 --- korman/exporter/material.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/korman/exporter/material.py b/korman/exporter/material.py index 6ddcdaf..98b830f 100644 --- a/korman/exporter/material.py +++ b/korman/exporter/material.py @@ -19,7 +19,7 @@ from pathlib import Path from PyHSPlasma import * import weakref -from . import explosions +from .explosions import * from .. import helpers from ..korlib import * from . import utils @@ -546,6 +546,9 @@ class MaterialConverter: image = key.image oWidth, oHeight = image.size + if oWidth == 0 and oHeight == 0: + raise ExportError("Image '{}' could not be loaded.".format(image.name)) + eWidth = helpers.ensure_power_of_two(oWidth) eHeight = helpers.ensure_power_of_two(oHeight) if (eWidth != oWidth) or (eHeight != oHeight):