diff --git a/samples/richedit/wxllist.cpp b/samples/richedit/wxllist.cpp index b5625309d2..bc00fa710e 100644 --- a/samples/richedit/wxllist.cpp +++ b/samples/richedit/wxllist.cpp @@ -1821,16 +1821,10 @@ wxLayoutList::SetFont(int family, int size, int style, int weight, int underline, wxChar const *fg, wxChar const *bg) { - wxColour - *cfg = NULL, - *cbg = NULL; + wxColour cfg = wxTheColourDatabase->Find((fg)?fg:wxT("BLACK")); + wxColour cbg = wxTheColourDatabase->Find((bg)?bg:wxT("WHITE")); - if( fg ) - cfg = wxTheColourDatabase->FindColour(fg); - if( bg ) - cbg = wxTheColourDatabase->FindColour(bg); - - SetFont(family,size,style,weight,underline,cfg,cbg); + SetFont(family,size,style,weight,underline,&cfg,&cbg); } void