diff --git a/samples/mfc/standard/04_Viewer3d/adm/win/vc10/Viewer3d.vcxproj b/samples/mfc/standard/04_Viewer3d/adm/win/vc10/Viewer3d.vcxproj index 3e84d694d0..63f3bb2233 100644 --- a/samples/mfc/standard/04_Viewer3d/adm/win/vc10/Viewer3d.vcxproj +++ b/samples/mfc/standard/04_Viewer3d/adm/win/vc10/Viewer3d.vcxproj @@ -240,7 +240,7 @@ TKBRep.lib;FWOSPlugin.lib;PTKernel.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPCAF.lib;TKPrim.lib;TKPShape.lib;TKService.lib;TKTopAlgo.lib;TKV2d.lib;TKV3d.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../x64\vc10\bin/Viewer3d.exe + ../../../../x64\vc10\bind/Viewer3d.exe true ..\..\..\..\x64\vc10\libd;$(CSF_OPT_LIB64D);%(AdditionalLibraryDirectories) true diff --git a/src/OpenGl/OpenGl_TextureBox.cxx b/src/OpenGl/OpenGl_TextureBox.cxx index 3342ff25ce..5f9f139f42 100755 --- a/src/OpenGl/OpenGl_TextureBox.cxx +++ b/src/OpenGl/OpenGl_TextureBox.cxx @@ -684,7 +684,10 @@ void FreeTexture (const Handle(OpenGl_Context)& theContext, for (int i = 0; i < textab(ID).contextdata.Length(); ++i) { Handle(OpenGl_ResourceTexture) aResource = new OpenGl_ResourceTexture (textab(ID).contextdata(i).number); - theContext->DelayedRelease (aResource); + + if (!theContext.IsNull()) { + theContext->DelayedRelease (aResource); + } } texdata(data).status = TEXDATA_NONE;