From d2242935374419b6ee9c642104fc3a1cc09a5c37 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Wed, 17 Jan 2007 14:39:38 +0100 Subject: fix segfault --- src/gipfel.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/gipfel.cxx') 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)); -- cgit v1.2.3