summaryrefslogtreecommitdiff
path: root/src/gipfel.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/gipfel.cxx')
-rw-r--r--src/gipfel.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gipfel.cxx b/src/gipfel.cxx
index bb58586..2fcce48 100644
--- a/src/gipfel.cxx
+++ b/src/gipfel.cxx
@@ -554,7 +554,9 @@ stitch(GipfelWidget::sample_mode_t m,
snprintf(buf, sizeof(buf), "%s/%s", path, argv[i]);
dot = strrchr(buf, '.');
- *dot = '\0';
+ if (dot) {
+ *dot = '\0';
+ }
strncat(buf, ".tiff", sizeof(buf));
st->set_output(argv[i], (OutputImage*) new TIFFOutputImage(buf));