diff --git a/cde/programs/dtstyle/ColorFile.c b/cde/programs/dtstyle/ColorFile.c index fe44ca5bc..5c87e8cff 100644 --- a/cde/programs/dtstyle/ColorFile.c +++ b/cde/programs/dtstyle/ColorFile.c @@ -248,7 +248,9 @@ ReadPalette( /* load the filename into the name element */ p = strstr (in_filename, PALETTE_SUFFIX); - *p = '\0'; + if(p) { + *p = '\0'; + } strcpy(new_palette->name, in_filename); /*