fix shader binary compilation to work with lazy compilation
[platform/core/uifw/dali-core.git] / dali / internal / render / shaders / program.cpp
index d442c3e..53160ef 100644 (file)
@@ -461,7 +461,11 @@ void Program::Load()
 {
   DALI_ASSERT_ALWAYS( NULL != mProgramData.Get() && "Program data is not initialized" );
 
-  Unload();
+  // If already linked don't do anything
+  if( mLinked )
+  {
+    return;
+  }
 
   LOG_GL( "CreateProgram()\n" );
   mProgramId = CHECK_GL( mContext, mGlAbstraction.CreateProgram() );