The gcc static analyzer reports this issue :

`src/java.desktop/unix/native/common/java2d/x11/X11SurfaceData.c:181:13: 
warning: dereference of NULL 'xsdo' [CWE-476] [-Wanalyzer-null-dereference]`

Seems we should better NULL-check the result of
`    X11SDOps *xsdo = X11SurfaceData_GetOps(env, this);`
because the function potentially returns NULL.

---------
- [x] I confirm that I make this contribution in accordance with the [OpenJDK 
Interim AI Policy](https://openjdk.org/legal/ai).

-------------

Commit messages:
 - JDK-8392561

Changes: https://git.openjdk.org/jdk/pull/33410/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=33410&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8392561
  Stats: 4 lines in 1 file changed: 3 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/33410.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/33410/head:pull/33410

PR: https://git.openjdk.org/jdk/pull/33410

Reply via email to