summaryrefslogtreecommitdiffstats
path: root/fpicker
diff options
context:
space:
mode:
authorSzymon Kłos <eszkadev@gmail.com>2015-07-21 09:40:49 +0200
committerSzymon Kłos <eszkadev@gmail.com>2015-07-24 12:28:53 +0200
commite211358e99942e38971a9f54bb305c3846720c9f (patch)
treec6b92af3cf1679a2c72280fd3b9d98b3b7f4c8d5 /fpicker
parentdefault label for service (diff)
downloadcore-e211358e99942e38971a9f54bb305c3846720c9f.tar.gz
core-e211358e99942e38971a9f54bb305c3846720c9f.zip
check pointers
Change-Id: Iacf9213d833a0a3c2d951c667108a5e2538f4215
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/source/office/RemoteFilesDialog.cxx43
1 files changed, 24 insertions, 19 deletions
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index 16627582cf53..7f0447a1bba7 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -689,30 +689,35 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, DoubleClickHdl )
IMPL_LINK_NOARG ( RemoteFilesDialog, SelectHdl )
{
SvTreeListEntry* pEntry = m_pFileView->FirstSelected();
- if (!pEntry)
- return 1;
- SvtContentEntry* pData = static_cast< SvtContentEntry* >( pEntry->GetUserData() );
- if( ( pData->mbIsFolder && ( m_eType == REMOTEDLG_TYPE_PATHDLG ) )
- || ( !pData->mbIsFolder && ( m_eType == REMOTEDLG_TYPE_FILEDLG ) ) )
+ if( pEntry )
{
- // url must contain user info, because we need this info in recent files entry
- // (to fill user field in login box by default)
- INetURLObject aURL( pData->maURL );
- INetURLObject aCurrentURL( m_sLastServiceUrl );
- aURL.SetUser( aCurrentURL.GetUser() );
+ SvtContentEntry* pData = static_cast< SvtContentEntry* >( pEntry->GetUserData() );
- m_sPath = aURL.GetMainURL( INetURLObject::NO_DECODE );
+ if( pData )
+ {
+ if( ( pData->mbIsFolder && ( m_eType == REMOTEDLG_TYPE_PATHDLG ) )
+ || ( !pData->mbIsFolder && ( m_eType == REMOTEDLG_TYPE_FILEDLG ) ) )
+ {
+ // url must contain user info, because we need this info in recent files entry
+ // (to fill user field in login box by default)
+ INetURLObject aURL( pData->maURL );
+ INetURLObject aCurrentURL( m_sLastServiceUrl );
+ aURL.SetUser( aCurrentURL.GetUser() );
- m_pName_ed->SetText( INetURLObject::decode( aURL.GetLastName(), INetURLObject::DECODE_WITH_CHARSET ) );
- }
- else
- {
- m_sPath.clear();
- m_pName_ed->SetText( "" );
- }
+ m_sPath = aURL.GetMainURL( INetURLObject::NO_DECODE );
- EnableControls();
+ m_pName_ed->SetText( INetURLObject::decode( aURL.GetLastName(), INetURLObject::DECODE_WITH_CHARSET ) );
+ }
+ else
+ {
+ m_sPath.clear();
+ m_pName_ed->SetText( "" );
+ }
+
+ EnableControls();
+ }
+ }
return 1;
}