diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2015-11-28 11:28:28 +0100 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2015-11-28 11:28:28 +0100 |
commit | 74bb0144ccda4bf3cc4f34b497e696a0a7eb99ec (patch) | |
tree | ac183845e185096c2b8728ed558d747226009493 /src/image.js | |
parent | dd7cc2f5104d488b0ba85366e14fae57edb767b7 (diff) | |
download | svg.js-74bb0144ccda4bf3cc4f34b497e696a0a7eb99ec.tar.gz svg.js-74bb0144ccda4bf3cc4f34b497e696a0a7eb99ec.zip |
added null check in image onload callback (fixes #415)
Diffstat (limited to 'src/image.js')
-rw-r--r-- | src/image.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/image.js b/src/image.js index ed803d6..9c1db21 100644 --- a/src/image.js +++ b/src/image.js @@ -18,6 +18,8 @@ SVG.Image = SVG.invent({ img.onload = function() { var p = self.parent(SVG.Pattern) + if(!p) return + // ensure image size if (self.width() == 0 && self.height() == 0) self.size(img.width, img.height) |