Null check to avoid crash 2.1b_release accepted/tizen_2.1/20130426.150343 submit/tizen_2.1/20130426.142334
authorchitta ranjan <chitta.rs@samsung.com>
Fri, 26 Apr 2013 07:28:26 +0000 (16:28 +0900)
committerchitta ranjan <chitta.rs@samsung.com>
Fri, 26 Apr 2013 07:28:26 +0000 (16:28 +0900)
Change-Id: I676a48f600096ba40abebef9563d6f3234d761d9
Signed-off-by: chitta ranjan <chitta.rs@samsung.com>
src/VpVideoPlayerForm.cpp

index baf8072..c183b99 100644 (file)
@@ -76,7 +76,7 @@ static const RequestId REQUEST_VIDEO_EVENT_BATTERY_LEVEL_CHANGED = 114;
 
 void DestroyPresentationModelInstance(void)
 {
-       delete VideoPlayerPresentationModel::GetInstance();
+       VideoPlayerPresentationModel::DestroyInstance();
 }
 
 VideoPlayerForm::VideoPlayerForm(void)
@@ -478,6 +478,8 @@ VideoPlayerForm::OnTerminating(void)
        DeleteTimer();
        DestroyPresentationModelInstance();
 
+       __pVideoPlayerPresentationModel = null;
+
        RemoveControl(*__pOverlayPanel);
        __pOverlayPanel = null;
 
@@ -497,6 +499,8 @@ VideoPlayerForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId
 
        AppLogDebug("OnSceneActivatedN");
 
+       TryReturnVoid(__pVideoPlayerPresentationModel != null, "__pVideoPlayerPresentationModel is null");
+
        String totalTime;
 
        CheckCallStatus();