mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-01 04:12:01 +08:00
Added handling to deal with if the lambda function passed in is a nullptr type.
This commit is contained in:
parent
c2d10aeeed
commit
ce77ade904
@ -9,6 +9,8 @@
|
|||||||
#include <wx/filename.h>
|
#include <wx/filename.h>
|
||||||
#include <wx/stdpaths.h>
|
#include <wx/stdpaths.h>
|
||||||
|
|
||||||
|
#include "Log.hpp"
|
||||||
|
|
||||||
/// Common static (that is, free-standing) functions, not part of an object hierarchy.
|
/// Common static (that is, free-standing) functions, not part of an object hierarchy.
|
||||||
|
|
||||||
namespace Slic3r { namespace GUI {
|
namespace Slic3r { namespace GUI {
|
||||||
@ -82,7 +84,8 @@ void append_menu_item(wxMenu* menu, const wxString& name,const wxString& help, T
|
|||||||
if (!icon.IsEmpty())
|
if (!icon.IsEmpty())
|
||||||
tmp->SetBitmap(wxBitmap(var(icon)));
|
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());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user