Prevent undefined behaviour

This commit is contained in:
Alexander van Gessel 2010-06-01 03:01:49 +01:00
parent ac51e2b495
commit e204e8069e

View file

@ -1991,7 +1991,7 @@ WML_HANDLER_FUNCTION(print, /*event_info*/, cfg)
font::remove_floating_label(floating_label);
// Display a message on-screen
const std::string& text = cfg["text"];
std::string text = cfg["text"];
if(text.empty())
return;