Changeset - r25154:b4a9d3c7eca0
[Not reviewed]
master
0 1 0
Jonathan G Rennison - 3 years ago 2021-04-05 20:32:48
j.g.rennison@gmail.com
Fix: Thread unsafe use of sprite cache in OpenGLBackend::DrawMouseCursor

See also: #8870
See also: #8977
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/video/opengl.cpp
Show inline comments
 
@@ -1060,9 +1060,9 @@ void OpenGLBackend::DrawMouseCursor()
 

	
 
		/* Sprites are cached by PopulateCursorCache(). */
 
		if (this->cursor_cache.Contains(sprite)) {
 
			const Sprite *spr = GetSprite(sprite, ST_NORMAL);
 
			Sprite *spr = this->cursor_cache.Get(sprite);
 

	
 
			this->RenderOglSprite((OpenGLSprite *)this->cursor_cache.Get(sprite)->data, _cursor.sprite_seq[i].pal,
 
			this->RenderOglSprite((OpenGLSprite *)spr->data, _cursor.sprite_seq[i].pal,
 
					_cursor.pos.x + _cursor.sprite_pos[i].x + UnScaleByZoom(spr->x_offs, ZOOM_LVL_GUI),
 
					_cursor.pos.y + _cursor.sprite_pos[i].y + UnScaleByZoom(spr->y_offs, ZOOM_LVL_GUI),
 
					ZOOM_LVL_GUI);
0 comments (0 inline, 0 general)