aboutsummaryrefslogtreecommitdiffstats
path: root/lib/MC/MCObjectStreamer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MC/MCObjectStreamer.cpp')
-rw-r--r--lib/MC/MCObjectStreamer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/MC/MCObjectStreamer.cpp b/lib/MC/MCObjectStreamer.cpp
index 21e6867..08fe501 100644
--- a/lib/MC/MCObjectStreamer.cpp
+++ b/lib/MC/MCObjectStreamer.cpp
@@ -405,7 +405,9 @@ void MCObjectStreamer::EmitFill(uint64_t NumBytes, uint8_t FillValue) {
}
void MCObjectStreamer::EmitZeros(uint64_t NumBytes) {
- unsigned ItemSize = getCurrentSection().first->isVirtualSection() ? 0 : 1;
+ const MCSection *Sec = getCurrentSection().first;
+ assert(Sec && "need a section");
+ unsigned ItemSize = Sec->isVirtualSection() ? 0 : 1;
insert(new MCFillFragment(0, ItemSize, NumBytes));
}