Fixed a Segmentation Fault when mr_iceblock was kicked into a brick containing coins...
[supertux.git] / src / supertux / info_box_line.cpp
index 77b8195..bc10362 100644 (file)
@@ -87,14 +87,13 @@ InfoBoxLine::LineType get_linetype_by_format_char(char format_char) {
 
 } // namespace
 
-InfoBoxLine::InfoBoxLine(char format_char, const std::string& text) :
+InfoBoxLine::InfoBoxLine(char format_char, const std::string& text_) :
   lineType(NORMAL),
-  font(Resources::normal_font),
+  font(get_font_by_format_char(format_char)),
   color(),
-  text(text),
+  text(text_),
   image()
 {
-  font = get_font_by_format_char(format_char);
   lineType = get_linetype_by_format_char(format_char);
   color = get_color_by_format_char(format_char);
   if (lineType == IMAGE)