diff --git a/src/mac/carbon/dc.cpp b/src/mac/carbon/dc.cpp index c0f44cf484..8011e7da3f 100644 --- a/src/mac/carbon/dc.cpp +++ b/src/mac/carbon/dc.cpp @@ -631,10 +631,9 @@ void wxDC::ComputeScaleAndOrigin() { // this is a bit artificial, but we need to force wxDC to think // the pen has changed - wxPen* pen = & GetPen(); - wxPen tempPen; - m_pen = tempPen; - SetPen(* pen); + wxPen pen(GetPen()); + m_pen = wxNullPen; + SetPen(pen); } }