fix bug when an invalid pos for textbox.move_caret

This commit is contained in:
Jinhao
2016-08-27 09:40:49 +08:00
parent b13f0a4ce5
commit cf99551924
3 changed files with 24 additions and 11 deletions

View File

@@ -344,8 +344,8 @@ namespace drawerbase {
{
auto editor = get_drawer_trigger().editor();
internal_scope_guard lock;
if (editor)
editor->move_caret(pos, true);
if (editor && editor->move_caret(pos, true))
API::refresh_window(handle());
return *this;
}