From d8933b2b8d3c2f00c811e511d6fb6fd4c1333a75 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 5 Jun 2014 00:28:46 +0000 Subject: [PATCH] Fix spurious assert when creating multiline wxTextCtrl from XRC. Don't try to set the hint unconditionally, this doesn't work with multiline text controls and so resulted in an assert when trying to create one from XRC since the changes of r76629. Closes #16317. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76666 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/xrc/xh_text.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/xrc/xh_text.cpp b/src/xrc/xh_text.cpp index 99a7b97f47..7a1b5c139b 100644 --- a/src/xrc/xh_text.cpp +++ b/src/xrc/xh_text.cpp @@ -69,7 +69,9 @@ wxObject *wxTextCtrlXmlHandler::DoCreateResource() if (HasParam(wxT("maxlength"))) text->SetMaxLength(GetLong(wxT("maxlength"))); - text->SetHint(GetText(wxS("hint"))); + const wxString hint = GetText(wxS("hint")); + if (!hint.empty()) + text->SetHint(hint); return text; }