Skip to content

Commit

Permalink
Add check for beam in Experiment.get_type
Browse files Browse the repository at this point in the history
  • Loading branch information
toastisme committed May 31, 2024
1 parent 4e8320c commit a724d7d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/dxtbx/model/experiment.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,12 @@ namespace dxtbx { namespace model {
return TOF;
}

dxtbx::model::BeamBase &beam_base_ref = *beam_;
PolychromaticBeam *beam = dynamic_cast<PolychromaticBeam *>(&beam_base_ref);
if (beam != nullptr) {
return LAUE;
if (beam_) {
dxtbx::model::BeamBase &beam_base_ref = *beam_;
PolychromaticBeam *beam = dynamic_cast<PolychromaticBeam *>(&beam_base_ref);
if (beam != nullptr) {
return LAUE;
}
}

if (!goniometer_ || !scan_ || scan_->is_still()) {
Expand Down

0 comments on commit a724d7d

Please sign in to comment.