summaryrefslogtreecommitdiff
path: root/vcl/quartz/salgdicommon.cxx
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2019-03-15 18:18:38 +0200
committerTor Lillqvist <tml@collabora.com>2019-03-15 18:31:55 +0200
commit7f0e669885fb1ac6efaceb5aea21c117825e3495 (patch)
tree410eb9880492eee68aa152a6d2f84d96c12af919 /vcl/quartz/salgdicommon.cxx
parent8a244ee9b43dce6bdcd930473586a2d8452dfb12 (diff)
tdf#124042: If mrContext is zero, calling Core Graphics APIs on it is futile
If mrContext is zero, the CG calls using it won't do anything and will cause "invalid context" warnings when running under Xcode. So just return early. Such calls to drawPolyPolygon() are apparently not essential but accidental and of no real use. Possibly related to bogus "focus" indicator painting. Which does not make sense on iOS as we aren't drawing to any actual "windows" with "focus". Change-Id: Icc4a768d8b255c09a8972551443ce59f4ad56089
Diffstat (limited to 'vcl/quartz/salgdicommon.cxx')
-rw-r--r--vcl/quartz/salgdicommon.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx
index d1beb08c1a66..011c4297095d 100644
--- a/vcl/quartz/salgdicommon.cxx
+++ b/vcl/quartz/salgdicommon.cxx
@@ -951,6 +951,11 @@ bool AquaSalGraphics::drawPolyLineBezier( sal_uInt32, const SalPoint*, const Pol
bool AquaSalGraphics::drawPolyPolygon( const basegfx::B2DPolyPolygon& rPolyPoly,
double fTransparency )
{
+#ifdef IOS
+ if (!mrContext)
+ return true;
+#endif
+
// short circuit if there is nothing to do
const int nPolyCount = rPolyPoly.count();
if( nPolyCount <= 0 )