summaryrefslogtreecommitdiff
path: root/core/fxge/ge
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxge/ge')
-rw-r--r--core/fxge/ge/cfx_graphstate.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/fxge/ge/cfx_graphstate.cpp b/core/fxge/ge/cfx_graphstate.cpp
index 54443b9636..ad6b5fc6c7 100644
--- a/core/fxge/ge/cfx_graphstate.cpp
+++ b/core/fxge/ge/cfx_graphstate.cpp
@@ -36,14 +36,16 @@ void CFX_GraphState::SetLineWidth(float width) {
}
CFX_GraphStateData::LineCap CFX_GraphState::GetLineCap() const {
- return m_Ref.GetObject()->m_LineCap;
+ return m_Ref.GetObject() ? m_Ref.GetObject()->m_LineCap
+ : CFX_GraphStateData::LineCapButt;
}
void CFX_GraphState::SetLineCap(CFX_GraphStateData::LineCap cap) {
m_Ref.GetPrivateCopy()->m_LineCap = cap;
}
CFX_GraphStateData::LineJoin CFX_GraphState::GetLineJoin() const {
- return m_Ref.GetObject()->m_LineJoin;
+ return m_Ref.GetObject() ? m_Ref.GetObject()->m_LineJoin
+ : CFX_GraphStateData::LineJoinMiter;
}
void CFX_GraphState::SetLineJoin(CFX_GraphStateData::LineJoin join) {