From 09c067b8e4269f88f454e63c04ae9bf8c168228f Mon Sep 17 00:00:00 2001 From: Adi Oanca Date: Mon, 15 Sep 2003 18:58:06 +0000 Subject: [PATCH] * modified 'font' member from '*font' to 'font'. '*font' was getting the pointer to system's plain font, and worse, it modified it. Now, it's all OK. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4682 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/servers/app/LayerData.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/headers/private/servers/app/LayerData.h b/headers/private/servers/app/LayerData.h index f3a2c6044f..cc938fbdde 100644 --- a/headers/private/servers/app/LayerData.h +++ b/headers/private/servers/app/LayerData.h @@ -35,8 +35,7 @@ public: alphaFncMode = B_ALPHA_OVERLAY; scale = 1.0; fontAliasing = true; - font = fontserver->GetSystemPlain(); - //font = NULL; + font = *(fontserver->GetSystemPlain()); clippReg = NULL; @@ -51,10 +50,6 @@ public: } ~LayerData(void) { - if(font) { - delete font; - font = NULL; - } if (image){ /* NOTE: I don't know yet how bitmap allocation/deallocation is managed by server. I tend to think it's a reference @@ -84,7 +79,7 @@ public: alpha_function alphaFncMode; float scale; bool fontAliasing; - ServerFont *font; + ServerFont font; BRegion *clippReg; @@ -98,3 +93,8 @@ public: escapement_delta edelta; }; #endif + +/* + @log + * modified 'font' member from '*font' to 'font'. '*font' was getting the pointer to system's plain font, and worse, it modified it. Now, it's all OK. +*/