소스 검색

almost lured myself into another null pointer trap, fixed

jp9000 12 년 전
부모
커밋
61c6defd77
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      libobs-opengl/gl-subsystem.c

+ 1 - 1
libobs-opengl/gl-subsystem.c

@@ -247,7 +247,7 @@ void device_load_texture(device_t device, texture_t tex, int unit)
 	if (!gl_active_texture(GL_TEXTURE0 + unit))
 		goto fail;
 
-	if (!tex || (cur_tex && cur_tex->gl_target != tex->gl_target))
+	if (cur_tex && (!tex || cur_tex->gl_target != tex->gl_target))
 		gl_bind_texture(cur_tex->gl_target, 0);
 
 	device->cur_textures[unit] = tex;