summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCao Cuong Ngo <cao.cuong.ngo@gmail.com>2013-09-26 16:13:18 +0200
committerCao Cuong Ngo <cao.cuong.ngo@gmail.com>2013-09-26 16:15:40 +0200
commit86218bda0d74fc5bfc877b5c12d594d527207b11 (patch)
treeac68d8ad7e9274ba2a4964ea3596ffb8c0e21e3d
parent34f4d2574987b272681b5843e8f5edc374f55fde (diff)
Fix fdo#68894 Cmis crashes on start up.
The reason of the crash is that the recent file opening feature can't get the session automatically. Change-Id: I6890c04cfdafc81d19c6b2b2024896df040fe091
-rw-r--r--ucb/source/ucp/cmis/cmis_content.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx
index 48556ed64d3e..0022a8a42666 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -364,6 +364,17 @@ namespace cmis
libcmis::ObjectPtr Content::getObject( const uno::Reference< ucb::XCommandEnvironment >& xEnv ) throw ( libcmis::Exception )
{
+ // can't get the session for some reason
+ // the recent file openning at start up is an example.
+ try
+ {
+ if ( !getSession( xEnv ) )
+ return m_pObject;
+ }
+ catch ( uno::RuntimeException& )
+ {
+ return m_pObject;
+ }
if ( !m_pObject.get() )
{
if ( !m_sObjectId.isEmpty( ) )