desktop/source/lib/init.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
New commits: commit e4ef020b7e7c4d97136dc69f97ddfee44c8fdae5 Author: Andrzej Hunt <andrzej.h...@collabora.com> Date: Thu Jul 10 12:19:36 2014 +0200 Check whether Command Args are already set up before doing so. Could already be set up e.g. if a client application is using UNO separately, in addition to LOK. Change-Id: I50c3230b6f2456360273902a308c303576baac10 Signed-off-by: Michael Meeks <michael.me...@collabora.com> diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 964aa3b..b78487a 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -412,7 +412,14 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath) try { - osl_setCommandArgs(0, NULL); + // If we've set up the command args elsewhere then we cannot do it + // again (as an assert will fire), this will be the case e.g. + // for unit tests (and possibly if UNO is being used in addition + // to LOK in an external program). + if (!osl_areCommandArgsSet()) + { + osl_setCommandArgs(0, NULL); + } initialize_uno(aAppURL); force_c_locale(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits