diff -r d9d8313203af -r 2c19c7cf5550 mtpdataproviders/mtpimagedp/src/cmtpimagedp.cpp --- a/mtpdataproviders/mtpimagedp/src/cmtpimagedp.cpp Mon Aug 09 12:19:11 2010 +0800 +++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedp.cpp Fri Aug 20 17:43:33 2010 +0800 @@ -96,8 +96,6 @@ { __FLOG_OPEN(KMTPSubsystem, KComponent); __FLOG(_L8(">> CMTPImageDataProvider::ConstructL")); - - iThumbnailManager = CMTPImageDpThumbnailCreator::NewL(*this); iNewPicNotifier = CMTPImageDpNewPicturesNotifier::NewL(); //Setup central repository connection @@ -454,11 +452,14 @@ __FLOG(_L8("<< NotifyStorageEnumerationCompleteL")); } -CMTPImageDpThumbnailCreator& CMTPImageDataProvider::ThumbnailManager() const - { - __ASSERT_DEBUG(iThumbnailManager, User::Invariant()); - return *iThumbnailManager; - } +CMTPImageDpThumbnailCreator* CMTPImageDataProvider::ThumbnailManager() + { + if(NULL == iThumbnailManager) + { + TRAP_IGNORE(iThumbnailManager = CMTPImageDpThumbnailCreator::NewL(*this)); + } + return iThumbnailManager; + } CMTPImageDpObjectPropertyMgr& CMTPImageDataProvider::PropertyMgr()const {