diff options
Diffstat (limited to 'hwpfilter')
-rw-r--r-- | hwpfilter/source/hcode.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/hwpfilter/source/hcode.cxx b/hwpfilter/source/hcode.cxx index 93f5f0ff72ca..42b7205824b2 100644 --- a/hwpfilter/source/hcode.cxx +++ b/hwpfilter/source/hcode.cxx @@ -1309,8 +1309,12 @@ char *hcolor2str(uchar color, uchar shade, char *buf, bool bIsChar) if( src[0] == 'C' && src[1] == ':' && src[2] == '\\' ) // Home Dir { ret.append("file://"); - ret.append(getenv("HOME")); - ret.push_back('/'); + const char *pHome = getenv("HOME"); + if (pHome) + { + ret.append(pHome); + ret.push_back('/'); + } i = 3; // skip first 3 } else if( src[0] == 'D' && src[1] == ':' && src[2] == '\\' ) // Root Dir |