Change-Id: I7be6559a82035993e8607b282b6ecc47ec365264
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
: mMemberFunction( function )
{
mImpl = new CallbackBase::Impl;
: mMemberFunction( function )
{
mImpl = new CallbackBase::Impl;
- mImpl->mObjectPointer = object;
- mImpl->mMemberFunctionDispatcher = dispatcher;
- mImpl->mDestructorDispatcher = NULL; // object is not owned
+ if( mImpl )
+ {
+ mImpl->mObjectPointer = object;
+ mImpl->mMemberFunctionDispatcher = dispatcher;
+ mImpl->mDestructorDispatcher = NULL; // object is not owned
+ }
}
CallbackBase::CallbackBase( void* object, MemberFunction function, Dispatcher dispatcher, Destructor destructor )
: mMemberFunction( function )
{
mImpl = new CallbackBase::Impl;
}
CallbackBase::CallbackBase( void* object, MemberFunction function, Dispatcher dispatcher, Destructor destructor )
: mMemberFunction( function )
{
mImpl = new CallbackBase::Impl;
- mImpl->mObjectPointer = object;
- mImpl->mMemberFunctionDispatcher = dispatcher;
- mImpl->mDestructorDispatcher = destructor; // object is owned
+ if( mImpl )
+ {
+ mImpl->mObjectPointer = object;
+ mImpl->mMemberFunctionDispatcher = dispatcher;
+ mImpl->mDestructorDispatcher = destructor; // object is owned
+ }
}
void CallbackBase::Reset()
}
void CallbackBase::Reset()