From 1628649d50d526adb8ca1a007c2c98b4152990dc Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Sat, 28 Apr 2018 23:38:27 -0500 Subject: [PATCH] Added handling to deal with if the lambda function passed in is a nullptr type. --- src/GUI/misc_ui.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/GUI/misc_ui.hpp b/src/GUI/misc_ui.hpp index d8586fec7..d40ab729c 100644 --- a/src/GUI/misc_ui.hpp +++ b/src/GUI/misc_ui.hpp @@ -9,6 +9,8 @@ #include #include +#include "Log.hpp" + /// Common static (that is, free-standing) functions, not part of an object hierarchy. namespace Slic3r { namespace GUI { @@ -82,7 +84,8 @@ void append_menu_item(wxMenu* menu, const wxString& name,const wxString& help, T if (!icon.IsEmpty()) tmp->SetBitmap(wxBitmap(var(icon))); - menu->Bind(wxEVT_MENU, lambda, tmp->GetId(), tmp->GetId()); + if (typeid(lambda) != typeid(nullptr)) + menu->Bind(wxEVT_MENU, lambda, tmp->GetId(), tmp->GetId()); } /*