summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-05-09 14:14:14 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-05-09 17:18:35 +0100
commit548a6894814c4fd067137d44bb009205911bf8c9 (patch)
tree4b8b06aeb6a602e5826405ecd8ac66c4ed5953f2 /svtools
parent023e907b6ba5112d3e0d75d822771c92fe17fb2f (diff)
VclPtr: fix crash on loading kde86727-1.html
and all the other html crashtest loading failures I believe Change-Id: I38d3e1ad283efc08f468d9062e520149663e3e84
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/filectrl.cxx9
-rw-r--r--svtools/source/uno/unoiface.cxx4
2 files changed, 8 insertions, 5 deletions
diff --git a/svtools/source/control/filectrl.cxx b/svtools/source/control/filectrl.cxx
index 974edbf2f0b7..ab07a4a7b688 100644
--- a/svtools/source/control/filectrl.cxx
+++ b/svtools/source/control/filectrl.cxx
@@ -193,14 +193,17 @@ IMPL_LINK_NOARG(FileControl, ButtonHdl)
return 0;
}
-
-
void FileControl::GetFocus()
{
maEdit->GrabFocus();
}
-
+void FileControl::SetEditModifyHdl( const Link<>& rLink )
+{
+ if (!maEdit || maEdit->IsDisposed())
+ return;
+ maEdit->SetModifyHdl(rLink);
+}
void FileControl::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags )
{
diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx
index ac364521afd3..8b9dd52f5446 100644
--- a/svtools/source/uno/unoiface.cxx
+++ b/svtools/source/uno/unoiface.cxx
@@ -595,11 +595,11 @@ void VCLXFileControl::SetWindow( const VclPtr< vcl::Window > &pWindow )
{
VclPtr< FileControl > pPrevFileControl = GetAsDynamic< FileControl >();
if ( pPrevFileControl )
- pPrevFileControl->GetEdit().SetModifyHdl( Link<>() );
+ pPrevFileControl->SetEditModifyHdl( Link<>() );
FileControl* pNewFileControl = dynamic_cast<FileControl*>( pWindow.get() );
if ( pNewFileControl )
- pNewFileControl->GetEdit().SetModifyHdl( LINK( this, VCLXFileControl, ModifyHdl ) );
+ pNewFileControl->SetEditModifyHdl( LINK( this, VCLXFileControl, ModifyHdl ) );
VCLXWindow::SetWindow( pWindow );
}