summaryrefslogtreecommitdiffstats
path: root/src/dot.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2010-03-24 20:39:59 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2010-03-24 20:39:59 (GMT)
commiteb1cb68e11a3b24222a49ed254f8f7aea2f73bae (patch)
tree1e47a4443afb2ec61f032669050ee1b8834baa8d /src/dot.cpp
parentcd19d7a220915d1f637e0a0a5b2d05d5750f5db0 (diff)
downloadDoxygen-eb1cb68e11a3b24222a49ed254f8f7aea2f73bae.zip
Doxygen-eb1cb68e11a3b24222a49ed254f8f7aea2f73bae.tar.gz
Doxygen-eb1cb68e11a3b24222a49ed254f8f7aea2f73bae.tar.bz2
Release-1.6.3-20100324
Diffstat (limited to 'src/dot.cpp')
-rw-r--r--src/dot.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/dot.cpp b/src/dot.cpp
index a951cf6..04be1c1 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -268,11 +268,12 @@ static void setDotFontPath(const char *path)
ASSERT(g_dotFontPath.isEmpty());
g_dotFontPath = portable_getenv("DOTFONTPATH");
QCString newFontPath = Config_getString("DOT_FONTPATH");
- if (!newFontPath.isEmpty() && path)
+ QCString spath = path;
+ if (!newFontPath.isEmpty() && !spath.isEmpty())
{
- newFontPath.prepend(path+portable_pathListSeparator());
+ newFontPath.prepend(spath+portable_pathListSeparator());
}
- else if (newFontPath.isEmpty() && path)
+ else if (newFontPath.isEmpty() && !spath.isEmpty())
{
newFontPath=path;
}
@@ -286,7 +287,14 @@ static void setDotFontPath(const char *path)
static void unsetDotFontPath()
{
- portable_setenv("DOTFONTPATH",g_dotFontPath);
+ if (g_dotFontPath.isEmpty())
+ {
+ portable_unsetenv("DOTFONTPATH");
+ }
+ else
+ {
+ portable_setenv("DOTFONTPATH",g_dotFontPath);
+ }
g_dotFontPath="";
}