At above line returns a pointer to the text control handle by window and we have not set the wxFLP_USE_TEXTCTRL flag. so when we create the file picker object and if we not specified the wxFLP_USE_TEXTCTRL flag then it return NULL pointer of text control.
So we have set the flag wxFLP_USE_TEXTCTRL in the ui file dlgServer.ui to fix the issue.