xref: /OK3568_Linux_fs/buildroot/package/directfb/0006-fix-client-gfx_state-initialisation.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1From 8e53c0b9cedb62b82e2b7680d793d433b647ae20 Mon Sep 17 00:00:00 2001
2From: Andre McCurdy <armccurdy@gmail.com>
3Date: Mon, 13 Jun 2016 13:32:44 -0700
4Subject: [PATCH] fix client->gfx_state initialisation
5
6Shortly before the DirectFB 1.7.7 release, an optimisation was added
7to CoreGraphicsStateClient_Init() to avoid creating an extended
8Graphics State object if it will not later be required:
9
10  4d422fb Client: Create extended Graphics State object when needed for later usage
11
12Unfortunately the client->gfx_state variable used to track the
13extended Graphics State object is not initialised, which can lead to
14crashes etc due to creation of the Graphics State object erroneously
15being skipped.
16
17Upstream-Status: Pending
18
19Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
20Signed-off-by: Philippe Reynes <philippe.reynes@sagemcom.com>
21---
22 src/core/CoreGraphicsStateClient.cpp | 1 +
23 1 file changed, 1 insertion(+)
24
25diff --git a/src/core/CoreGraphicsStateClient.cpp b/src/core/CoreGraphicsStateClient.cpp
26index 5d46f0e..5007755 100644
27--- a/src/core/CoreGraphicsStateClient.cpp
28+++ b/src/core/CoreGraphicsStateClient.cpp
29@@ -364,6 +364,7 @@ CoreGraphicsStateClient_Init( CoreGraphicsStateClient *client,
30      client->renderer  = NULL;
31      client->requestor = NULL;
32      client->throttle  = NULL;
33+     client->gfx_state = NULL;
34
35      if (dfb_config->task_manager) {
36           if (dfb_config->call_nodirect) {
37--
381.9.1
39
40