projects
/
wxWidgets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fafd43c
)
Fixed wxDoSetEnv (ticket # 9588).
author
Stefan Neis
<Stefan.Neis@t-online.de>
Sun, 15 Jun 2008 16:42:20 +0000
(16:42 +0000)
committer
Stefan Neis
<Stefan.Neis@t-online.de>
Sun, 15 Jun 2008 16:42:20 +0000
(16:42 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54241
c3d73ce0
-8a6f-49c7-b76d-
6d57e0e08775
src/os2/utils.cpp
patch
|
blob
|
blame
|
history
diff --git
a/src/os2/utils.cpp
b/src/os2/utils.cpp
index e3bc440f2714d8cafe12dd5a4bf423ce4f7a36c6..14d2c6b3e19d13da73d22591ecb62aea4485490f 100644
(file)
--- a/
src/os2/utils.cpp
+++ b/
src/os2/utils.cpp
@@
-241,6
+241,14
@@
bool wxGetEnv(const wxString& var, wxString *value)
static bool wxDoSetEnv(const wxString& variable, const char *value)
{
#if defined(HAVE_SETENV)
+ if ( !value )
+ {
+#ifdef HAVE_UNSETENV
+ return unsetenv(variable.mb_str()) == 0;
+#else
+ value = _T(""); // mustn't pass NULL to setenv()
+#endif
+ }
return setenv(variable.mb_str(), value, 1 /* overwrite */) == 0;
#elif defined(HAVE_PUTENV)
wxString s = variable;