1*4882a593SmuzhiyunFrom 8e53c0b9cedb62b82e2b7680d793d433b647ae20 Mon Sep 17 00:00:00 2001 2*4882a593SmuzhiyunFrom: Andre McCurdy <armccurdy@gmail.com> 3*4882a593SmuzhiyunDate: Mon, 13 Jun 2016 13:32:44 -0700 4*4882a593SmuzhiyunSubject: [PATCH] fix client->gfx_state initialisation 5*4882a593Smuzhiyun 6*4882a593SmuzhiyunShortly before the DirectFB 1.7.7 release, an optimisation was added 7*4882a593Smuzhiyunto CoreGraphicsStateClient_Init() to avoid creating an extended 8*4882a593SmuzhiyunGraphics State object if it will not later be required: 9*4882a593Smuzhiyun 10*4882a593Smuzhiyun 4d422fb Client: Create extended Graphics State object when needed for later usage 11*4882a593Smuzhiyun 12*4882a593SmuzhiyunUnfortunately the client->gfx_state variable used to track the 13*4882a593Smuzhiyunextended Graphics State object is not initialised, which can lead to 14*4882a593Smuzhiyuncrashes etc due to creation of the Graphics State object erroneously 15*4882a593Smuzhiyunbeing skipped. 16*4882a593Smuzhiyun 17*4882a593SmuzhiyunUpstream-Status: Pending 18*4882a593Smuzhiyun 19*4882a593SmuzhiyunSigned-off-by: Andre McCurdy <armccurdy@gmail.com> 20*4882a593SmuzhiyunSigned-off-by: Philippe Reynes <philippe.reynes@sagemcom.com> 21*4882a593Smuzhiyun--- 22*4882a593Smuzhiyun src/core/CoreGraphicsStateClient.cpp | 1 + 23*4882a593Smuzhiyun 1 file changed, 1 insertion(+) 24*4882a593Smuzhiyun 25*4882a593Smuzhiyundiff --git a/src/core/CoreGraphicsStateClient.cpp b/src/core/CoreGraphicsStateClient.cpp 26*4882a593Smuzhiyunindex 5d46f0e..5007755 100644 27*4882a593Smuzhiyun--- a/src/core/CoreGraphicsStateClient.cpp 28*4882a593Smuzhiyun+++ b/src/core/CoreGraphicsStateClient.cpp 29*4882a593Smuzhiyun@@ -364,6 +364,7 @@ CoreGraphicsStateClient_Init( CoreGraphicsStateClient *client, 30*4882a593Smuzhiyun client->renderer = NULL; 31*4882a593Smuzhiyun client->requestor = NULL; 32*4882a593Smuzhiyun client->throttle = NULL; 33*4882a593Smuzhiyun+ client->gfx_state = NULL; 34*4882a593Smuzhiyun 35*4882a593Smuzhiyun if (dfb_config->task_manager) { 36*4882a593Smuzhiyun if (dfb_config->call_nodirect) { 37*4882a593Smuzhiyun-- 38*4882a593Smuzhiyun1.9.1 39*4882a593Smuzhiyun 40