File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/org/freedesktop/gstreamer/lowlevel Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -232,7 +232,7 @@ public String toString() {
232232 return GVALUE_API .g_strdup_value_contents (this );
233233 }
234234 }
235-
235+
236236 public static final class GValueArray extends com .sun .jna .Structure {
237237 public static final String GTYPE_NAME = "GValueArray" ;
238238
@@ -242,6 +242,7 @@ public static final class GValueArray extends com.sun.jna.Structure {
242242 public volatile int n_prealloced ;
243243
244244 private boolean ownsMemory ;
245+ private static final Pointer NO_MEMORY_POINTER = new Pointer (0 );
245246
246247 public GValueArray () {
247248 this (0 );
@@ -254,7 +255,8 @@ public GValueArray(int n_prealloced) {
254255
255256 public GValueArray (Pointer pointer ) {
256257 super (pointer );
257- n_values = pointer .getInt (0 );
258+ if (pointer != Pointer .NULL && !NO_MEMORY_POINTER .equals (pointer ))
259+ n_values = pointer .getInt (0 );
258260 }
259261
260262 @ SuppressWarnings ("unused" )
You can’t perform that action at this time.
0 commit comments