--- lib/wx/c_src/wxe_impl.cpp.orig	2017-03-14 21:10:54.000000000 +0100
+++ lib/wx/c_src/wxe_impl.cpp	2017-04-13 21:49:44.514193000 +0200
@@ -56,7 +56,7 @@
 extern ErlDrvTermData  init_caller;
 extern int wxe_status;
 
-wxeFifo * wxe_queue = NULL;
+wxeFifo * wxe_queue = nullptr;
 
 unsigned int wxe_needs_signal = 0;  // inside batch if larger than 0
 
@@ -87,7 +87,7 @@
   if(what == PING_PORT && wxe_status == WXE_INITIATED) {
     erl_drv_mutex_lock(wxe_batch_locker_m);
     if(wxe_needs_signal) {
-      wxe_queue->Add(WXE_DEBUG_PING, NULL, 0, sd);
+      wxe_queue->Add(WXE_DEBUG_PING, nullptr, 0, sd);
       erl_drv_cond_signal(wxe_batch_locker_c);
     }
     wxWakeUpIdle();
@@ -122,7 +122,7 @@
 
   global_me = new wxeMemEnv();
   wxe_queue = new wxeFifo(2000);
-  cb_buff = NULL;
+  cb_buff = nullptr;
   recurse_level = 0;
   delayed_delete = new wxeFifo(100);
   delayed_cleanup  = new wxList;
@@ -247,7 +247,7 @@
   // Cleanup old memenv's and deleted objects
   if(recurse_level == 0) {
     wxeCommand *curr;
-    while((curr = delayed_delete->Get()) != NULL) {
+    while((curr = delayed_delete->Get()) != nullptr) {
       wxe_dispatch(*curr);
       curr->Delete();
     }
@@ -271,7 +271,7 @@
   wxeCommand *event;
   erl_drv_mutex_lock(wxe_batch_locker_m);
   while(true) {
-    while((event = batch->Get()) != NULL) {
+    while((event = batch->Get()) != nullptr) {
       erl_drv_mutex_unlock(wxe_batch_locker_m);
       switch(event->op) {
       case WXE_BATCH_END:
@@ -327,7 +327,7 @@
   erl_drv_mutex_lock(wxe_batch_locker_m);
   peek = batch->Cleanup(batch->cb_start);
   while(true) {
-    while((event = batch->Peek(&peek)) != NULL) {
+    while((event = batch->Peek(&peek)) != nullptr) {
       wxeMemEnv *memenv = getMemEnv(event->port);
       // fprintf(stderr, "  Ev %d %lu\r\n", event->op, event->caller);
       if(event->caller == process ||  // Callbacks from CB process only
@@ -405,7 +405,7 @@
 {
   // Clear incoming cmd queue first
   // dispatch_cmds();
-  wxWindow *parent = NULL;
+  wxWindow *parent = nullptr;
   wxeMemEnv * memenv = refmap[Ecmd.port];
 
   if(!memenv) {
@@ -438,7 +438,7 @@
 	    ptrMap::iterator parentRef = ptr2ref.find(parent);
 	    if(parentRef == ptr2ref.end()) {
 	      // The parent is already dead delete the parent ref
-	      win->SetParent(NULL);
+	      win->SetParent(nullptr);
 	    }
 	  }
 	  if(recurse_level > 0) {
@@ -491,7 +491,7 @@
 	wxeRefData *refd = it->second;
 	if(refd->alloc_in_erl) {
 	  if((refd->type == 8) && ((wxObject *)ptr)->IsKindOf(CLASSINFO(wxBufferedDC))) {
-	    ((wxBufferedDC *)ptr)->m_dc = NULL; // Workaround
+	    ((wxBufferedDC *)ptr)->m_dc = nullptr; // Workaround
 	  }
 	  wxString msg;
 	  bool cleanup_ref=true;
@@ -536,7 +536,7 @@
     wxeRefData *refd = it->second;
     return refd;
   }
-  return NULL;
+  return nullptr;
 }
 
 
@@ -616,7 +616,7 @@
     wxeRefData *refd = it->second;
     intList free = refd->memenv->free;
     int ref = refd->ref;
-    refd->memenv->ref2ptr[ref] = NULL;
+    refd->memenv->ref2ptr[ref] = nullptr;
     free.Append(ref);
 
     if(((int) refd->pid) != -1) {
@@ -633,7 +633,7 @@
       for(wxSizerItemList::compatibility_iterator node = list.GetFirst();
 	  node; node = node->GetNext()) {
 	wxSizerItem *item = node->GetData();
-	wxObject *content=NULL;
+	wxObject *content=nullptr;
 	if((content = item->GetWindow()))
 	  if(ptr2ref.end() == ptr2ref.find(content)) {
 	    wxString msg;
@@ -666,7 +666,7 @@
     throw wxe_badarg(index);
   }
   void * temp = memenv->ref2ptr[index];
-  if((index < memenv->next) && ((index == 0) || (temp > NULL)))
+  if((index < memenv->next) && ((index == 0) || (temp > nullptr)))
     return temp;
   else {
     throw wxe_badarg(index);
@@ -678,7 +678,7 @@
   if(!memenv)
     throw wxe_badarg(index);
   void * temp = memenv->ref2ptr[index];
-  if((index < memenv->next) && ((index == 0) || (temp > NULL))) {
+  if((index < memenv->next) && ((index == 0) || (temp > nullptr))) {
     ptrMap::iterator it;
     it = ptr2ref.find(temp);
     if(it != ptr2ref.end()) {
