Skip to content

Commit c4f2da7

Browse files
committed
Fixed segmentation fault
Caused by access of null pointer in case ShaderPass does use Window as Output and not a RenderTexture.
1 parent 780e967 commit c4f2da7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/SHADERed/UI/ObjectPreviewUI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ namespace ed {
445445
static char pxCoord[32] = { 0 };
446446

447447
for (int i = 0; i < pixelList.size(); i++) {
448-
if (pixelList[i].RenderTexture->Name == item->Name && pixelList[i].Fetched) { // we only care about window's pixel info here
448+
if (pixelList[i].RenderTexture && pixelList[i].RenderTexture->Name == item->Name && pixelList[i].Fetched) { // we only care about window's pixel info here
449449

450450
if (Settings::Instance().Debug.PrimitiveOutline) {
451451
ImGui::SetCursorPosX(posX);

0 commit comments

Comments
 (0)