8057830: Crash in Java2D Queue Flusher, OGLSD_SetScratchSurface

Reviewed-by: serb, denis
This commit is contained in:
Hendrik Schreiber 2014-10-31 19:45:54 +03:00 committed by Sergey Bylokhov
parent 562ef36160
commit 7a54433a74
2 changed files with 7 additions and 0 deletions

View File

@ -72,7 +72,9 @@ OGLGC_DestroyOGLGraphicsConfig(jlong pConfigInfo)
}
[pool drain];
free(ctxinfo);
oglc->ctxInfo = NULL;
}
cglinfo->context = NULL;
}
free(cglinfo);

View File

@ -187,6 +187,11 @@ OGLSD_SetScratchSurface(JNIEnv *env, jlong pConfigInfo)
}
OGLContext *oglc = cglInfo->context;
if (oglc == NULL) {
J2dRlsTraceLn(J2D_TRACE_ERROR, "OGLSD_SetScratchContext: ogl context is null");
return NULL;
}
CGLCtxInfo *ctxinfo = (CGLCtxInfo *)oglc->ctxInfo;
JNF_COCOA_ENTER(env);