Kaydet (Commit) 2466c85c authored tarafından Stephan Bergmann's avatar Stephan Bergmann Kaydeden (comit) Caolán McNamara

Bogus assert

implementation can indeed be empty when cppu::writeSharedLibComponentInfo calls
getEnvironmentFromModule(mod, curEnv, "", ""), which in the final if-branch
calls getEnvironment with implementation = "".  Happens when adding desktop/qa's
test-active.oxt.  Regression introduced with
ae3a0c8d "Add .component <implementation
constructor='...' feature."

(cherry picked from commit 97464be9)
Conflicts:
	cppuhelper/source/shlib.cxx

Change-Id: Ia70958e4aa18d378ff35063bdf6187f6e073b765
Reviewed-on: https://gerrit.libreoffice.org/19956Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst b4533424
......@@ -40,17 +40,19 @@
css::uno::Environment cppuhelper::detail::getEnvironment(
rtl::OUString const & name, rtl::OUString const & implementation)
{
assert(!implementation.isEmpty());
rtl::OUString n(name);
static char const * log = std::getenv("UNO_ENV_LOG");
if (log != 0 && *log != 0) {
rtl::OString imps(log);
for (sal_Int32 i = 0; i != -1;) {
rtl::OString imp(imps.getToken(0, ';', i));
//TODO: this assumes UNO_ENV_LOG only contains ASCII characters:
if (implementation.equalsAsciiL(imp.getStr(), imp.getLength())) {
n += ":log";
break;
if (!implementation.isEmpty()) {
static char const * log = std::getenv("UNO_ENV_LOG");
if (log != 0 && *log != 0) {
rtl::OString imps(log);
for (sal_Int32 i = 0; i != -1;) {
rtl::OString imp(imps.getToken(0, ';', i));
//TODO: this assumes UNO_ENV_LOG only contains ASCII characters:
if (implementation.equalsAsciiL(imp.getStr(), imp.getLength()))
{
n += ":log";
break;
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment