diff options
author | Joseph Heenan <joseph@emobix.co.uk> | 2014-10-02 19:57:55 +0200 |
---|---|---|
committer | Joseph Heenan <joseph@emobix.co.uk> | 2014-10-04 08:11:35 -0500 |
commit | aa35b1b812a53c3653b942ed0e4e89eac9a86bb0 (patch) | |
tree | f0db19f1b3dbfa3b11fd30f8ebc7d1591d27cb50 /platform | |
parent | 986ec1d2fc07d1487c9865dc639b6a01651d6b2b (diff) | |
download | mupdf-aa35b1b812a53c3653b942ed0e4e89eac9a86bb0.tar.xz |
iOS: Fix an analyser warning
In MuDocRef initialise. it spotted cases where self could be released
twice after a failure.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/ios/Classes/MuDocRef.m | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/platform/ios/Classes/MuDocRef.m b/platform/ios/Classes/MuDocRef.m index 076d633d..bd2b87c0 100644 --- a/platform/ios/Classes/MuDocRef.m +++ b/platform/ios/Classes/MuDocRef.m @@ -30,10 +30,13 @@ } fz_catch(ctx) { - if (doc != NULL) - fz_close_document(doc); - [self release]; - self = nil; + if (self) + { + if (doc != NULL) + fz_close_document(doc); + [self release]; + self = nil; + } } } return self; |