--- a/mgllab/dialogs.cpp
+++ b/mgllab/dialogs.cpp
@@ -21,6 +21,7 @@
 #include <FL/Fl_Output.H>
 #include <FL/Fl_Select_Browser.H>
 #include <FL/Fl_Toggle_Button.H>
+#define NULL nullptr
 //-----------------------------------------------------------------------------
 const char *cols = " wbgrcmylenuqphkWBGRCMYLENUQPH";
 Fl_Menu_Item colors[] = {
