summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-07-23 21:12:55 +0200
committerMichael Stahl <mstahl@redhat.com>2014-07-24 00:34:50 +0200
commit73b2ef39fc5e748e80dca72268b67e5a0d6da8ff (patch)
tree80f8bda08b046b9f7c307fb7d8aead25e256a659 /sal
parent1d36d91d0a1814ba209e683f74658a92e167a73f (diff)
sal: avoid STL asserts in create_merged_environment
"Assertion failed: sequence not ordered" printed when running smoketest Change-Id: Id9b7541f43342adf62137718dc332c0187c32f57
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/w32/procimpl.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/sal/osl/w32/procimpl.cxx b/sal/osl/w32/procimpl.cxx
index bccda26b49d7..e560a7bb571e 100644
--- a/sal/osl/w32/procimpl.cxx
+++ b/sal/osl/w32/procimpl.cxx
@@ -129,6 +129,11 @@ namespace /* private */
p += l + 1;
}
FreeEnvironmentStrings(env);
+
+ // it is apparently possible that the environment is not completely
+ // sorted; Cygwin may append entries, which breaks the equal_range
+ std::stable_sort(environment->begin(), environment->end(),
+ less_environment_variable());
}
/* the environment list must be sorted, new values