Skip to content

Commit e44a57a

Browse files
authored
UGraphics: Fix "BufferBuilder was empty" exception
GitHub: #91 Linear: EM-3137
1 parent 9d749e4 commit e44a57a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/java/gg/essential/universal/UGraphics.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,8 @@ public void drawDirect() {
10781078
//$$ doDraw();
10791079
//#else
10801080
//#if MC>=12100
1081-
//$$ BuiltBuffer builtBuffer = instance.end();
1081+
//$$ BuiltBuffer builtBuffer = instance.endNullable();
1082+
//$$ if (builtBuffer == null) return;
10821083
//#endif
10831084
//#if MC>=11600
10841085
//$$ if (renderLayer != null) {
@@ -1106,7 +1107,8 @@ public void drawSorted(int cameraX, int cameraY, int cameraZ) {
11061107
//$$ doDraw();
11071108
//#else
11081109
//#if MC>=12100
1109-
//$$ BuiltBuffer builtBuffer = instance.end();
1110+
//$$ BuiltBuffer builtBuffer = instance.endNullable();
1111+
//$$ if (builtBuffer == null) return;
11101112
//#if MC>=12102
11111113
//$$ builtBuffer.sortQuads(SORTED_QUADS_ALLOCATOR, RenderSystem.getProjectionType().getVertexSorter());
11121114
//#else

0 commit comments

Comments
 (0)