summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-05-28 21:35:43 +0100
committerAndras Timar <andras.timar@collabora.com>2015-08-06 12:21:54 +0200
commit12278b37cea48e660d7068d67349701d1accbe97 (patch)
treef0da8cd9794888ae6b9da5f656f4b60b0ad823b5 /basic
parent7b45cd849f31637bf64f552cf58f9ef2d0a69831 (diff)
tdf#91702 - fix stack-based MessBox allocation.
Change-Id: I62dd164e281911d9db3de453789a5badc7cd5fd7 Reviewed-on: https://gerrit.libreoffice.org/15954 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'basic')
-rw-r--r--basic/source/runtime/basrdll.cxx2
-rw-r--r--basic/source/runtime/iosys.cxx5
2 files changed, 4 insertions, 3 deletions
diff --git a/basic/source/runtime/basrdll.cxx b/basic/source/runtime/basrdll.cxx
index a1ad75ab7191..e02c0f6798a0 100644
--- a/basic/source/runtime/basrdll.cxx
+++ b/basic/source/runtime/basrdll.cxx
@@ -98,7 +98,7 @@ void BasicDLL::BasicBreak()
{
bJustStopping = true;
StarBASIC::Stop();
- InfoBox( 0, BasResId(IDS_SBERR_TERMINATED).toString() ).Execute();
+ ScopedVclPtr<InfoBox>::Create( nullptr, BasResId(IDS_SBERR_TERMINATED).toString() )->Execute();
bJustStopping = false;
}
}
diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx
index 2e666ea04128..40fb2f63be77 100644
--- a/basic/source/runtime/iosys.cxx
+++ b/basic/source/runtime/iosys.cxx
@@ -1004,9 +1004,10 @@ void SbiIoSystem::WriteCon(const OUString& rText)
}
{
SolarMutexGuard aSolarGuard;
- if( !MessBox( Application::GetDefDialogParent(),
+ if( !ScopedVclPtr<MessBox>::Create(
+ Application::GetDefDialogParent(),
WinBits( WB_OK_CANCEL | WB_DEF_OK ),
- OUString(), s ).Execute() )
+ OUString(), s )->Execute() )
{
nError = SbERR_USER_ABORT;
}