fix crash that occurs when place::modify a field which isn't leftmost one
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* An Implementation of Place for Layout
|
* An Implementation of Place for Layout
|
||||||
* Nana C++ Library(http://www.nanapro.org)
|
* Nana C++ Library(http://www.nanapro.org)
|
||||||
* Copyright(C) 2003-2017 Jinhao(cnjinhao@hotmail.com)
|
* Copyright(C) 2003-2018 Jinhao(cnjinhao@hotmail.com)
|
||||||
*
|
*
|
||||||
* Distributed under the Boost Software License, Version 1.0.
|
* Distributed under the Boost Software License, Version 1.0.
|
||||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
@@ -3184,6 +3184,22 @@ namespace nana
|
|||||||
|
|
||||||
modified_ptr->div_owner = div_owner;
|
modified_ptr->div_owner = div_owner;
|
||||||
modified_ptr->div_next = div_next;
|
modified_ptr->div_next = div_next;
|
||||||
|
|
||||||
|
if (div_owner)
|
||||||
|
{
|
||||||
|
implement::division * pv_div = nullptr;
|
||||||
|
//Updates the div_next of the div at front of modified one.
|
||||||
|
for (auto & div : div_owner->children)
|
||||||
|
{
|
||||||
|
if (div.get() == modified_ptr)
|
||||||
|
{
|
||||||
|
if (pv_div)
|
||||||
|
pv_div->div_next = modified_ptr;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
pv_div = div.get();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user