wxwindows/wizard.cpp: fixed a crash when pressing Ok in Open-dialog without

actually selecting anything (reported by Trax)
both: fix a compiler warning (c++ likes function that don't change their
parameters to declare them const)
parent e250bb09
...@@ -682,7 +682,8 @@ void wizInputPage::OnEnablePartial(wxCommandEvent& event) ...@@ -682,7 +682,8 @@ void wizInputPage::OnEnablePartial(wxCommandEvent& event)
void wizInputPage::OnChoose(wxCommandEvent& event) void wizInputPage::OnChoose(wxCommandEvent& event)
{ {
p_open_dialog = new OpenDialog( p_intf, this, -1, -1, OPEN_STREAM ); p_open_dialog = new OpenDialog( p_intf, this, -1, -1, OPEN_STREAM );
if( p_open_dialog->ShowModal() == wxID_OK ) if( p_open_dialog->ShowModal() == wxID_OK &&
!p_open_dialog->mrl.IsEmpty() )
{ {
mrl_text->SetValue(p_open_dialog->mrl[0] ); mrl_text->SetValue(p_open_dialog->mrl[0] );
} }
...@@ -1273,7 +1274,7 @@ void wizTranscodeExtraPage::OnWizardPageChanging( wxWizardEvent& event ) ...@@ -1273,7 +1274,7 @@ void wizTranscodeExtraPage::OnWizardPageChanging( wxWizardEvent& event )
} }
if( event.GetDirection() ) if( event.GetDirection() )
{ {
p_parent->SetTranscodeOut( (char *)file_text->GetValue().mb_str()); p_parent->SetTranscodeOut( file_text->GetValue().mb_str());
} }
} }
...@@ -1485,7 +1486,7 @@ void WizardDialog::SetStream( char *method, char *address ) ...@@ -1485,7 +1486,7 @@ void WizardDialog::SetStream( char *method, char *address )
this->address = strdup( address ); this->address = strdup( address );
} }
void WizardDialog::SetTranscodeOut( char *address ) void WizardDialog::SetTranscodeOut( const char *address )
{ {
this->address = strdup( address ); this->address = strdup( address );
} }
......
...@@ -704,7 +704,7 @@ public: ...@@ -704,7 +704,7 @@ public:
void SetTTL( int i_ttl ); void SetTTL( int i_ttl );
void SetPartial( int, int ); void SetPartial( int, int );
void SetStream( char *method, char *address ); void SetStream( char *method, char *address );
void SetTranscodeOut( char *address ); void SetTranscodeOut( const char *address );
void SetAction( int i_action ); void SetAction( int i_action );
int GetAction(); int GetAction();
void SetSAP( bool b_enabled, const char *psz_name ); void SetSAP( bool b_enabled, const char *psz_name );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment