aboutsummaryrefslogtreecommitdiff
path: root/src/render.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/render.rs')
-rw-r--r--src/render.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/render.rs b/src/render.rs
index bb38399..90eff14 100644
--- a/src/render.rs
+++ b/src/render.rs
@@ -19,6 +19,9 @@ quick_error! {
cause(err)
from()
}
+ EmptyBuild {
+ description("The build template contains nothing worth rendering")
+ }
}
}
@@ -284,6 +287,9 @@ impl<'r> Renderer<'r> {
build: &BuildTemplate,
) -> Result<RgbaImage, RenderError> {
let images = self.construct_parts(build)?;
+ if images.is_empty() {
+ return Err(RenderError::EmptyBuild);
+ }
self.merge_parts(&images)
}