Changeset 23376


Ignore:
Timestamp:
10/02/18 14:45:56 (6 years ago)
Author:
Mathieu Morlighem
Message:

BUG: fixed crash with input not always provided

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/analyses/HydrologyDCInefficientAnalysis.cpp

    r23373 r23376  
    374374        }
    375375        if(smb_model==SMBgradientscomponentsEnum){
    376                 surface_runoff_input = basalelement->GetInput(SmbRunoffEnum);
     376                surface_runoff_input = basalelement->GetInput(SmbRunoffEnum); _assert_(surface_runoff_input);
    377377        }
    378378
     
    393393                if(!isefficientlayer){
    394394                        basal_melt_input->GetInputValue(&water_load,gauss);
    395                         surface_runoff_input->GetInputValue(&runoff_value,gauss);
     395                        if(surface_runoff_input) surface_runoff_input->GetInputValue(&runoff_value,gauss);
     396                        else                     runoff_value = 0.;
    396397                        scalar = Jdet*gauss->weight*(water_load+runoff_value);
    397398                        //scalar = Jdet*gauss->weight*(water_load)/sediment_transmitivity;
Note: See TracChangeset for help on using the changeset viewer.