summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-10-09 14:18:11 +0200
committerMichael Stahl <mstahl@redhat.com>2013-10-09 19:46:00 +0200
commit2386a92c1e6e8ec263edb4dc4fdcfeaa4673ce1f (patch)
tree27a8b34bbf6925fc7d7b201bdbb932cfd0ae0bb4 /sal
parentd703c8f64c6cd650bb753cf1f6f39b3e81f06a41 (diff)
pyuno: set up fake command line in getComponentContext()
Easy to trigger the assert in osl_getCommandArgCount(), just run instdir/*/program/python and "import unohelper". Avoid that by setting up a fake command line, hopefully nobody expects to be able to give relevant args to python... Change-Id: I0df6c23d6ecbb3c2bce81a9d5bcecdcb1729ddbb
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/process_impl.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sal/osl/unx/process_impl.cxx b/sal/osl/unx/process_impl.cxx
index b75e7725b2e0..00766ccf4304 100644
--- a/sal/osl/unx/process_impl.cxx
+++ b/sal/osl/unx/process_impl.cxx
@@ -176,7 +176,7 @@ sal_uInt32 SAL_CALL osl_getCommandArgCount (void)
sal_uInt32 result = 0;
pthread_mutex_lock (&(g_command_args.m_mutex));
- SAL_WARN_IF (g_command_args.m_nCount == 0, "sal.osl", "osl_setCommandArgs() not called before calling osl_getCommandArgCount()");
+ assert (g_command_args.m_nCount != 0);
if (g_command_args.m_nCount > 0)
result = g_command_args.m_nCount - 1;
pthread_mutex_unlock (&(g_command_args.m_mutex));