Created
December 17, 2019 03:37
-
-
Save misyltoad/e2c11388eac0ea3f763fc553369cc35d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From b5eeab4d2378e95a1ba58ff1aef53cb979ceb98f Mon Sep 17 00:00:00 2001 | |
From: Joshua Ashton <[email protected]> | |
Date: Mon, 25 Nov 2019 03:17:05 +0000 | |
Subject: [PATCH] Fix a use after free in shader editor | |
--- | |
shadereditor/vnodeview.cpp | 6 +++--- | |
1 file changed, 3 insertions(+), 3 deletions(-) | |
diff --git a/shadereditor/vnodeview.cpp b/shadereditor/vnodeview.cpp | |
index 154d23c0..5a3f7706 100644 | |
--- a/shadereditor/vnodeview.cpp | |
+++ b/shadereditor/vnodeview.cpp | |
@@ -792,9 +792,6 @@ void CNodeView::UpdateRTs() | |
pRenderContext->ClearColor4ub( 0, 0, 0, 255 ); | |
pRenderContext->PushRenderTargetAndViewport( GetPingPongRT(0) ); | |
pRenderContext->ClearBuffers( true, false ); | |
-#ifndef SHADER_EDITOR_DLL_2006 | |
- pRenderContext.SafeRelease(); | |
-#endif | |
Frustum tmp; | |
#ifdef SHADER_EDITOR_DLL_2006 | |
@@ -802,6 +799,9 @@ void CNodeView::UpdateRTs() | |
#else | |
render->Push3DView( pRenderContext, setup, 0, GetPingPongRT( 0 ), tmp ); | |
#endif | |
+ | |
+ pRenderContext.SafeRelease(); | |
+ | |
//pRenderContext->PushRenderTargetAndViewport( GetPingPongRT( 0 ) ); | |
gShaderEditorSystem->UpdateConstants( &setup ); | |
-- | |
2.22.2 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment