mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-14 10:00:36 +00:00
Font/Text: layout should never be null in set_text
This commit is contained in:
parent
01ecc04ac8
commit
4bbad94109
|
@ -320,10 +320,6 @@ void pango_text::apply_attributes(const font::attribute_list& attrs)
|
|||
bool pango_text::set_text(const std::string& text, const bool markedup)
|
||||
{
|
||||
if(markedup != markedup_text_ || text != text_) {
|
||||
if(layout_ == nullptr) {
|
||||
layout_.reset(pango_layout_new(context_.get()));
|
||||
}
|
||||
|
||||
const std::u32string wide = unicode_cast<std::u32string>(text);
|
||||
std::string narrow = unicode_cast<std::string>(wide);
|
||||
if(text != narrow) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user