Nabi issue 36377 fix
authorchitta ranjan <chitta.rs@samsung.com>
Mon, 29 Apr 2013 07:55:06 +0000 (16:55 +0900)
committerchitta ranjan <chitta.rs@samsung.com>
Mon, 29 Apr 2013 07:55:06 +0000 (16:55 +0900)
Change-Id: Ifaf03ba1a878c71b52e654205b41812b6f090cf9
Signed-off-by: chitta ranjan <chitta.rs@samsung.com>
src/VpVideoPlayerPresentationModel.cpp

index 3a7843a..7cf89e7 100644 (file)
@@ -73,9 +73,12 @@ VideoPlayerPresentationModel::VideoPlayerPresentationModel(void)
 VideoPlayerPresentationModel::~VideoPlayerPresentationModel(void)
 {
        DeleteTimer();
-       __pPlayer->Stop();
-       __pPlayer->Close();
-       delete __pPlayer;
+       if (__pPlayer != null)
+       {
+               __pPlayer->Stop();
+               __pPlayer->Close();
+               delete __pPlayer;
+       }
        delete __pMediaPathArrayList;
        delete __pCurrentPlayContentPath;
 }
@@ -216,8 +219,12 @@ VideoPlayerPresentationModel::ConstructPlayerInstanceWithBufferInfo(void)
 
        AppLogDebug("__pPlayer [%x]", __pPlayer);
 
-       __pPlayer->Construct(*this, &bufferInfo);
-       TryCatch(r == E_SUCCESS, , "__pPlayer->Construct failed:%s", GetErrorMessage(r));
+       r = __pPlayer->Construct(*this, &bufferInfo);
+       if (IsFailed(r))
+       {
+               delete __pPlayer;
+               __pPlayer = null;
+       }
 
        return r;
 
@@ -1073,7 +1080,11 @@ VideoPlayerPresentationModel::InitializePlayer(void)
        AppLogDebug("__pPlayer [%x]", __pPlayer);
 
        r = __pPlayer->Construct(*this, &bufferInfo);
-       TryCatch(r == E_SUCCESS, , "__pPlayer->Construct failed:%s", GetErrorMessage(r));
+       if (IsFailed(r))
+       {
+               delete __pPlayer;
+               __pPlayer = null;
+       }
 
        return r;