From: Heeyong Song Date: Wed, 8 Nov 2017 01:52:30 +0000 (+0900) Subject: [4.0] Fix a crash issue X-Git-Tag: accepted/tizen/4.0/unified/20171109.065834~1 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git;a=commitdiff_plain;h=f761e1fa4209b47ae18543797b0183b005b510b0 [4.0] Fix a crash issue OnWindowHidden and OnWindowShown can be called before mThreadController is started in NotifySceneCreated. In this case mThreadController should not be paused or resumed. Change-Id: I63db11085a2682fb7a0199616e5e9381b672e06f --- diff --git a/adaptors/common/adaptor-impl.cpp b/adaptors/common/adaptor-impl.cpp index 519cac6..c0a6699 100644 --- a/adaptors/common/adaptor-impl.cpp +++ b/adaptors/common/adaptor-impl.cpp @@ -276,8 +276,6 @@ void Adaptor::Start() // Initialize the thread controller mThreadController->Initialize(); - mState = RUNNING; - ProcessCoreEvents(); // Ensure any startup messages are processed. for ( ObserverContainer::iterator iter = mObservers.begin(), endIter = mObservers.end(); iter != endIter; ++iter ) @@ -714,7 +712,7 @@ void Adaptor::OnWindowShown() void Adaptor::OnWindowHidden() { - if ( STOPPED != mState ) + if ( RUNNING == mState ) { Pause(); @@ -757,6 +755,8 @@ void Adaptor::NotifySceneCreated() // process after surface is created (registering to remote surface provider if required) SurfaceInitialized(); + + mState = RUNNING; } void Adaptor::NotifyLanguageChanged()