diff options
Diffstat (limited to 'vcl/unx/source/app/saldata.cxx')
-rw-r--r-- | vcl/unx/source/app/saldata.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/vcl/unx/source/app/saldata.cxx b/vcl/unx/source/app/saldata.cxx index 50ef71df8619..beb7b60a551c 100644 --- a/vcl/unx/source/app/saldata.cxx +++ b/vcl/unx/source/app/saldata.cxx @@ -425,10 +425,8 @@ void SalXLib::Init() * the clipboard build another connection * to the xserver using $DISPLAY */ - const char envpre[] = "DISPLAY="; - char *envstr = new char[sizeof(envpre)+aDisplay.getLength()]; - snprintf(envstr, sizeof(envpre)+aDisplay.getLength(), "DISPLAY=%s", aDisplay.getStr()); - putenv(envstr); + rtl::OUString envVar(RTL_CONSTASCII_USTRINGPARAM("DISPLAY")); + osl_setEnvironment(envVar.pData, aParam.pData); } break; } |