summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--crop-tool/crop-tool.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/crop-tool/crop-tool.cpp b/crop-tool/crop-tool.cpp
index 8208688e..c0bf9265 100644
--- a/crop-tool/crop-tool.cpp
+++ b/crop-tool/crop-tool.cpp
@@ -139,6 +139,12 @@ static bool load_directory(anim_group& group, options& opts, anim_atlas& atlas,
break;
}
+ if (max == 1)
+ {
+ Error{Error::Flag::NoSpace} << "no files in directory " << input_dir << "!";
+ return false;
+ }
+
if (!opts.nframes)
opts.nframes = max-1;
else if (opts.nframes != max-1)