Foundation classes for a basic GUI implementing simple widgets and events. (Fork for custom changes.)

Fork of SimpleGUI by Duncan McIntyre

Files at this revision

API Documentation at this revision

Comitter:
elh
Date:
Tue Oct 18 19:43:15 2016 +0000
Parent:
19:71dbf00c9159
Commit message:
Initialize Textwidgets _text to NULL preventing crash if widget is draw until a text was set.

Changed in this revision

Widgets/TextWidget.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Widgets/TextWidget.cpp	Sat Oct 08 15:37:12 2016 +0000
+++ b/Widgets/TextWidget.cpp	Tue Oct 18 19:43:15 2016 +0000
@@ -6,6 +6,7 @@
 **/
 TextWidget::TextWidget(GraphicsContext *context) :
     Widget(context),
+    _text(NULL),
     _renderer(context->fontRenderer()),
     _font(context->defaultFont()),
     _halign(LEFT), _valign(TOP)
@@ -14,6 +15,7 @@
 
 TextWidget::TextWidget(GraphicsContext *context, FontRenderer* renderer) :
     Widget(context),
+    _text(NULL),
     _renderer(renderer),
     _font(context->defaultFont()),
     _halign(LEFT), _valign(TOP)
@@ -22,6 +24,7 @@
 
 TextWidget::TextWidget(GraphicsContext *context, FontRenderer* renderer, Font* font) :
     Widget(context),
+    _text(NULL),
     _renderer(renderer),
     _font(font),
     _halign(LEFT), _valign(TOP)