Skip to content

Commit ec28313

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 ec28313

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/SHADERed/UI/ObjectPreviewUI.cpp

Lines changed: 2 additions & 2 deletions
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);
@@ -616,4 +616,4 @@ namespace ed {
616616
}
617617
}
618618
}
619-
}
619+
}

0 commit comments

Comments
 (0)