diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2007-01-17 14:39:38 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2007-01-17 14:39:38 +0100 |
commit | d2242935374419b6ee9c642104fc3a1cc09a5c37 (patch) | |
tree | d42f65abc7eb881b43818aa9c0c4c1436732135d /src | |
parent | 7b58a6debdec0d9d9309d63154c0016e66757982 (diff) |
fix segfault
Diffstat (limited to 'src')
-rw-r--r-- | src/gipfel.cxx | 4 |
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)); |