summaryrefslogtreecommitdiffstats
path: root/src/bltGrPSOutput.C
diff options
context:
space:
mode:
Diffstat (limited to 'src/bltGrPSOutput.C')
-rw-r--r--src/bltGrPSOutput.C9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/bltGrPSOutput.C b/src/bltGrPSOutput.C
index cd10076..e43b370 100644
--- a/src/bltGrPSOutput.C
+++ b/src/bltGrPSOutput.C
@@ -609,10 +609,13 @@ int PostScript::preamble(const char* fileName)
void PostScript::addComments(const char** comments)
{
- for (const char** p = comments; *p; p += 2) {
- if (*(p+1) == NULL)
+ if (!comments)
+ return;
+
+ for (const char** pp = comments; *pp; pp+=2) {
+ if (*(pp+1) == NULL)
break;
- format("%% %s: %s\n", *p, *(p+1));
+ format("%% %s: %s\n", *pp, *(pp+1));
}
}