fixed null reference on selecting same stage. fixed null reference when rotating phone during change stage opration
This commit is contained in:
parent
683add9045
commit
abeb283fd9
1 changed files with 12 additions and 1 deletions
|
@ -436,12 +436,23 @@ public class TourViewActivity extends SherlockFragmentActivity {
|
|||
|
||||
@Override
|
||||
protected Void doInBackground(TourInformation... params) {
|
||||
//if tour is already selected - do nothing
|
||||
if (customization.getSelectedTour()!= null){
|
||||
if (customization.getSelectedTour().equals(params[0])){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
customization.selectTour(params[0], IProgress.EMPTY_PROGRESS);
|
||||
return null;
|
||||
}
|
||||
|
||||
protected void onPostExecute(Void result) {
|
||||
//to avoid illegal argument exception when rotating phone during loading
|
||||
try {
|
||||
dlg.dismiss();
|
||||
} catch (Exception ex){
|
||||
|
||||
}
|
||||
startTourView();
|
||||
};
|
||||
}.execute(tour);
|
||||
|
|
Loading…
Reference in a new issue