Linux: Added missing NULL check
This commit is contained in:
parent
daa07a6fc0
commit
508af9d0b9
|
@ -267,6 +267,10 @@ bool initPeerInfo(JNIEnv *env, jobject peer_info_handle, Display *display, int s
|
||||||
peer_info->glx13 = extension_flags.GLX13;
|
peer_info->glx13 = extension_flags.GLX13;
|
||||||
if (peer_info->glx13) {
|
if (peer_info->glx13) {
|
||||||
GLXFBConfig *configs = chooseVisualGLX13(env, display, screen, pixel_format, use_display_bpp, drawable_type, double_buffered);
|
GLXFBConfig *configs = chooseVisualGLX13(env, display, screen, pixel_format, use_display_bpp, drawable_type, double_buffered);
|
||||||
|
if (configs == NULL) {
|
||||||
|
throwException(env, "Could not choose GLX13 config");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (isDebugEnabled()) {
|
if (isDebugEnabled()) {
|
||||||
XVisualInfo *vis_info = _glXGetVisualFromFBConfig(display, configs[0]);
|
XVisualInfo *vis_info = _glXGetVisualFromFBConfig(display, configs[0]);
|
||||||
if (vis_info != NULL) {
|
if (vis_info != NULL) {
|
||||||
|
@ -278,7 +282,7 @@ bool initPeerInfo(JNIEnv *env, jobject peer_info_handle, Display *display, int s
|
||||||
int result = _glXGetFBConfigAttrib(display, configs[0], GLX_FBCONFIG_ID, &config_id);
|
int result = _glXGetFBConfigAttrib(display, configs[0], GLX_FBCONFIG_ID, &config_id);
|
||||||
XFree(configs);
|
XFree(configs);
|
||||||
if (result != Success) {
|
if (result != Success) {
|
||||||
throwException(env, "Could not choose GLX13 config");
|
throwException(env, "Could not get GLX_FBCONFIG_ID from GLXFBConfig");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
peer_info->config.glx13_config.config_id = config_id;
|
peer_info->config.glx13_config.config_id = config_id;
|
||||||
|
|
Loading…
Reference in New Issue