From b3d31bdb1ad2263ab8226e55eaeb565b7b50fc08 Mon Sep 17 00:00:00 2001 From: DarkWyrm Date: Sun, 5 Oct 2003 17:51:13 +0000 Subject: [PATCH] Another LayerData-related crash fix git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4950 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/servers/app/ServerFont.h | 2 +- src/servers/app/server/ServerFont.cpp | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/headers/private/servers/app/ServerFont.h b/headers/private/servers/app/ServerFont.h index 1882a78492..d3ad3c8219 100644 --- a/headers/private/servers/app/ServerFont.h +++ b/headers/private/servers/app/ServerFont.h @@ -35,7 +35,7 @@ class FontStyle; class ServerFont { public: - ServerFont(){ ServerFont(NULL); } + ServerFont(void); ServerFont(FontStyle *fstyle, float fsize=12.0, float frotation=0.0, float fshear=90.0, uint16 flags=0, uint8 spacing=B_CHAR_SPACING); ServerFont(const ServerFont &font); diff --git a/src/servers/app/server/ServerFont.cpp b/src/servers/app/server/ServerFont.cpp index 9aeadf8e16..7d10bc7fec 100644 --- a/src/servers/app/server/ServerFont.cpp +++ b/src/servers/app/server/ServerFont.cpp @@ -55,6 +55,21 @@ ServerFont::ServerFont(FontStyle *style, float size, float rotation, float shear fstyle->AddDependent(); } +ServerFont::ServerFont(void) +{ + fstyle=NULL; + fsize=0.0; + frotation=0.0; + fshear=90.0; + fflags=0; + fspacing=B_STRING_SPACING; + fdirection=B_FONT_LEFT_TO_RIGHT; + fface=B_REGULAR_FACE; + ftruncate=B_TRUNCATE_END; + fencoding=B_UNICODE_UTF8; + fbounds.Set(0,0,0,0); +} + /*! \brief Copy Constructor \param font ServerFont to copy