🐛 Fix ACTION_ITEM with nullptr (#23195)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
Jason Smith 2021-12-08 11:10:37 -08:00 committed by GitHub
parent a84e0404e0
commit 65e52c1150
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,7 +55,7 @@ class MenuItem_button : public MenuItemBase {
class MenuItem_function : public MenuItem_button { class MenuItem_function : public MenuItem_button {
public: public:
//static inline void action(PGM_P const, const uint8_t, const menuAction_t func) { (*func)(); }; //static inline void action(PGM_P const, const uint8_t, const menuAction_t func) { (*func)(); };
static inline void action(PGM_P const, const menuAction_t func) { (*func)(); }; static inline void action(PGM_P const, const menuAction_t func) { if (func) (*func)(); };
}; };
// GCODES_ITEM(LABEL, GCODES) // GCODES_ITEM(LABEL, GCODES)