diff --git a/src/motif/listbox.cpp b/src/motif/listbox.cpp index 2107f2e894..d8b12adf8a 100644 --- a/src/motif/listbox.cpp +++ b/src/motif/listbox.cpp @@ -617,7 +617,7 @@ void wxListBoxCallback (Widget WXUNUSED(w), XtPointer clientData, event.SetString( item->GetString( n ) ); int x = -1; - if( cbs->event->type == ButtonRelease ) + if( NULL != cbs->event && cbs->event->type == ButtonRelease ) { XButtonEvent* evt = (XButtonEvent*)cbs->event;