build fix & ctd fix (check null)

This commit is contained in:
remi durand 2021-02-22 13:09:23 +01:00
parent dc17f37045
commit 3b253f3bb4
2 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@
namespace Slic3r {
class Surface;
class SegmentedIntersectionLine;
struct SegmentedIntersectionLine;
struct ExPolygonWithOffset;
class FillRectilinear : public Fill

View File

@ -291,7 +291,7 @@ void ObjectLayers::sys_color_changed()
const std::vector<size_t> btns = {2, 3}; // del_btn, add_btn
for (auto btn : btns) {
wxSizerItem* b_item = item->GetSizer()->GetItem(btn);
if (b_item->IsWindow()) {
if (b_item != nullptr && b_item->IsWindow()) {
auto button = dynamic_cast<PlusMinusButton*>(b_item->GetWindow());
if (button != nullptr)
button->msw_rescale();