From e6655225e6ee229fb688fb65324e4e9b949065d5 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 4 Jun 2014 10:16:06 +0200 Subject: Avoid static BasicDLL (that would be destroyed after DeInitVCL now) Change-Id: Id8968a7746815ecce79b6eb1ce971b74e770efa4 --- basic/qa/cppunit/basictest.hxx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/basic/qa/cppunit/basictest.hxx b/basic/qa/cppunit/basictest.hxx index 369f0dfbbb16..af0c0e808cf8 100644 --- a/basic/qa/cppunit/basictest.hxx +++ b/basic/qa/cppunit/basictest.hxx @@ -27,10 +27,11 @@ class MacroSnippet bool mbError; SbModuleRef mpMod; StarBASICRef mpBasic; + BasicDLL maDll; // we need a dll instance for resouce manager etc. void InitSnippet() { - CPPUNIT_ASSERT_MESSAGE( "No resource manager", basicDLL().GetBasResMgr() != NULL ); + CPPUNIT_ASSERT_MESSAGE( "No resource manager", maDll.GetBasResMgr() != NULL ); mpBasic = new StarBASIC(); StarBASIC::SetGlobalErrorHdl( LINK( this, MacroSnippet, BasicErrorHdl ) ); } @@ -141,12 +142,6 @@ class MacroSnippet StarBASIC::SetGlobalErrorHdl( Link() ); mbError = false; } - - BasicDLL& basicDLL() - { - static BasicDLL maDll; // we need a dll instance for resouce manager etc. - return maDll; - } }; IMPL_LINK( MacroSnippet, BasicErrorHdl, StarBASIC *, /*pBasic*/) -- cgit