[PATCH v2 1/2] d3dx9_36: Handle NULL palette
Alistair Leslie-Hughes
leslie_alistair at hotmail.com
Sat Mar 21 23:05:36 CDT 2020
D3DFMT_P8 don't have a palette and cause a if they have to_rgba function.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
dlls/d3dx9_36/surface.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
index 42e7bf16f1..e2b398345c 100644
--- a/dlls/d3dx9_36/surface.c
+++ b/dlls/d3dx9_36/surface.c
@@ -1796,7 +1796,7 @@ void point_filter_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slic
struct vec4 color, tmp;
format_to_vec4(src_format, src_ptr, &color);
- if (src_format->to_rgba)
+ if (src_format->to_rgba && palette)
src_format->to_rgba(&color, &tmp, palette);
else
tmp = color;
--
2.25.1
More information about the wine-devel
mailing list