/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
: 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;
- 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()