Skip to content

Commit 14d037c

Browse files
pcaspersjenkins
authored andcommitted
QPR-12230 fix
1 parent aa9fda6 commit 14d037c

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

OREData/ored/portfolio/convertiblebond.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -500,11 +500,13 @@ void ConvertibleBond::build(const boost::shared_ptr<ore::data::EngineFactory>& e
500500
Date d1 = qlUnderlyingBond->maturityDate();
501501

502502
// FIXME, the following only works, if we have the dividends loaded at this point...
503-
auto div = equity->dividendFixings();
504-
for (auto const& d : div) {
505-
if (d.exDate >= d0) {
506-
requiredFixings_.addFixingDate(fx->fixingCalendar().adjust(d.exDate, Preceding),
507-
data_.conversionData().fxIndex());
503+
if (equity != nullptr) {
504+
auto div = equity->dividendFixings();
505+
for (auto const& d : div) {
506+
if (d.exDate >= d0) {
507+
requiredFixings_.addFixingDate(fx->fixingCalendar().adjust(d.exDate, Preceding),
508+
data_.conversionData().fxIndex());
509+
}
508510
}
509511
}
510512

0 commit comments

Comments
 (0)