*/\r
\r
public ByteBuffer getBuffer() {\r
+ if (getRows() == 0)\r
+ // Issue #768 - CheckJNI frowns upon env->NewDirectByteBuffer with NULL buffer or capacity 0\r
+ // "JNI WARNING: invalid values for address (0x0) or capacity (0)"\r
+ // FreeType sets FT_Bitmap::buffer to NULL when the bitmap is empty (e.g. for ' ')\r
+ // JNICheck is on by default on emulators and might have a point anyway...\r
+ // So let's avoid this and just return a dummy non-null non-zero buffer\r
+ return ByteBuffer.allocate(1);\r
return getBuffer(address);\r
}\r
\r