From 062ec23f6c5c9319cf2c2915259643d3c80de201 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 5 Nov 2012 20:57:57 +0100 Subject: [PATCH] CTextBox: move framebuffer define only into initVar framebuffer = NULL was called in all constructors, so it should be enough to define this only at one point. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/55896356f158f00a425524784470b5fdf814b80a Author: Thilo Graf Date: 2012-11-05 (Mon, 05 Nov 2012) Origin message was: ------------------ *CTextBox: move framebuffer define only into initVar framebuffer = NULL was called in all constructors, so it should be enough to define this only at one point. --- src/gui/widget/textbox.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/gui/widget/textbox.cpp b/src/gui/widget/textbox.cpp index 0b6dce25d..657ecf559 100644 --- a/src/gui/widget/textbox.cpp +++ b/src/gui/widget/textbox.cpp @@ -74,8 +74,7 @@ CTextBox::CTextBox(const char * text, Font* font_text, const int pmode, { //TRACE("[CTextBox] new\r\n"); initVar(); - - frameBuffer = NULL; + max_width = 0; if(text != NULL) @@ -124,8 +123,6 @@ CTextBox::CTextBox(const char * text) //TRACE("[CTextBox] new\r\n"); initVar(); - frameBuffer = NULL; - if(text != NULL) m_cText = *text; @@ -156,6 +153,8 @@ CTextBox::~CTextBox() void CTextBox::initVar(void) { //TRACE("[CTextBox]->InitVar\r\n"); + frameBuffer = NULL; + m_showTextFrame = 0; m_nNrOfNewLine = 0; m_nMaxLineWidth = 0;