Browse Source

🐛 Fix ACTION_ITEM with nullptr (#23195)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Jason Smith 2 years ago
parent
commit
65e52c1150
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      Marlin/src/lcd/menu/menu_item.h

+ 1
- 1
Marlin/src/lcd/menu/menu_item.h View File

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

Loading…
Cancel
Save