mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-02-20 22:54:30 +01:00
Fixed NPE when safeNewBuffer returns NULL.
This commit is contained in:
parent
1760ef88a7
commit
3e698786be
|
|
@ -263,7 +263,7 @@ public class JavaMethodsGenerator {
|
|||
if (has_result) {
|
||||
if ( method.getAnnotation(GLreturn.class) == null ) {
|
||||
if ( ByteBuffer.class.equals(Utils.getJavaType(result_type)) )
|
||||
writer.println("\t\treturn " + Utils.RESULT_VAR_NAME + ".order(ByteOrder.nativeOrder());"); // safeNewBuffer returns a direct ByteBuffer with BIG_ENDIAN order.
|
||||
writer.println("\t\treturn " + Utils.RESULT_VAR_NAME + " == null ? null : " + Utils.RESULT_VAR_NAME + ".order(ByteOrder.nativeOrder());"); // safeNewBuffer returns a direct ByteBuffer with BIG_ENDIAN order.
|
||||
else
|
||||
writer.println("\t\treturn " + Utils.RESULT_VAR_NAME + ";");
|
||||
} else
|
||||
|
|
|
|||
Loading…
Reference in a new issue