提交 96031f23 编写于 作者: L Lioncash

Fix a possible null pointer dereference

上级 98478b68
......@@ -310,11 +310,11 @@ static int gl_choose_pixel_format(HDC hdc, struct gs_init_data *info)
static inline bool gl_getpixelformat(HDC hdc, struct gs_init_data *info,
int *format, PIXELFORMATDESCRIPTOR *pfd)
{
*format = gl_choose_pixel_format(hdc, info);
if (!format)
return false;
*format = gl_choose_pixel_format(hdc, info);
if (!DescribePixelFormat(hdc, *format, sizeof(*pfd), pfd)) {
blog(LOG_ERROR, "DescribePixelFormat failed, %u",
GetLastError());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册