File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ namespace Plugin {
4242
4343 // Setup skip URL for right offset.
4444 _service = service;
45+ _service->AddRef ();
4546 _deactivationInProgress = false ;
4647
4748 config.FromString (_service->ConfigLine ());
@@ -67,19 +68,21 @@ namespace Plugin {
6768
6869/* virtual */ void Launcher::Deinitialize (PluginHost::IShell* /* service */ )
6970{
70- ASSERT (_service != nullptr );
71- ASSERT (_memory != nullptr );
72- ASSERT (_activity.IsValid () == true );
71+ if (_service != nullptr ) {
72+ ASSERT (_memory != nullptr );
73+ ASSERT (_activity.IsValid () == true );
7374
74- _deactivationInProgress = true ;
75+ _deactivationInProgress = true ;
7576
76- _activity->Shutdown ();
77- _observer.Unregister (&_notification);
78- _activity.Release ();
77+ _activity->Shutdown ();
78+ _observer.Unregister (&_notification);
79+ _activity.Release ();
7980
80- _memory->Release ();
81- _memory = nullptr ;
82- _service = nullptr ;
81+ _memory->Release ();
82+ _memory = nullptr ;
83+ _service->Release ();
84+ _service = nullptr ;
85+ }
8386}
8487
8588/* virtual */ string Launcher::Information () const
You can’t perform that action at this time.
0 commit comments