From 11a5ed9ee8bfbf433097fd76314d78cea489961a Mon Sep 17 00:00:00 2001 From: Wonsik Jung Date: Mon, 7 Sep 2020 11:16:15 +0900 Subject: [PATCH] [Tizen] Fix the converity issue of GlWindow Fix the converity issue of GlWindow(1148976) It is related of value init. Change-Id: I61eba52b1f80390ca53fcec24c4b6fa87aa121d9 --- dali/internal/window-system/common/gl-window-impl.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/dali/internal/window-system/common/gl-window-impl.cpp b/dali/internal/window-system/common/gl-window-impl.cpp index 8ac0e17..d9b96f7 100644 --- a/dali/internal/window-system/common/gl-window-impl.cpp +++ b/dali/internal/window-system/common/gl-window-impl.cpp @@ -94,6 +94,9 @@ GlWindow::GlWindow() mFocusChangeSignal(), mResizedSignal(), mVisibilityChangedSignal(), + mGLInitCallback( 0 ), + mGLRenderFrameCallback( 0 ), + mGLTerminateCallback( 0 ), mGLRenderCallback( nullptr ), mEGLSurface( nullptr ), mEGLContext( nullptr ), @@ -113,7 +116,10 @@ GlWindow::~GlWindow() mEventHandler->RemoveObserver( *this ); } - mGLTerminateCallback(); + if( mGLTerminateCallback ) + { + mGLTerminateCallback(); + } if( mIsEGLInitialize ) { @@ -767,11 +773,17 @@ bool GlWindow::RunCallback() if( !mInitCallback ) { - mGLInitCallback(); + if( mGLInitCallback ) + { + mGLInitCallback(); + } mInitCallback = true; } - mGLRenderFrameCallback(); + if( mGLRenderFrameCallback ) + { + mGLRenderFrameCallback(); + } if( mIsWindowRotated ) { -- 2.7.4