aboutsummaryrefslogtreecommitdiff
path: root/js/lib
diff options
context:
space:
mode:
authorhwc4872012-06-01 14:09:05 -0700
committerhwc4872012-06-01 14:09:05 -0700
commit7afe0ddcae8f2f0899bffd16ba171c927b3fca96 (patch)
tree3c4bad5f2acbad78172d2f0970bb8dd29d18561d /js/lib
parent1c445cf5d905f79937998cf2f1115594ea8c1074 (diff)
downloadninja-7afe0ddcae8f2f0899bffd16ba171c927b3fca96.tar.gz
Correction for texture paths.
Diffstat (limited to 'js/lib')
-rw-r--r--js/lib/rdge/texture.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/js/lib/rdge/texture.js b/js/lib/rdge/texture.js
index 498dcf3b..bd8e6198 100644
--- a/js/lib/rdge/texture.js
+++ b/js/lib/rdge/texture.js
@@ -68,9 +68,12 @@ function Texture( dstWorld, texMapName, wrap, mips )
68 { 68 {
69 // determine if the source is a canvas or an image file 69 // determine if the source is a canvas or an image file
70 var viewUtils = require("js/helper-classes/3D/view-utils").ViewUtils; 70 var viewUtils = require("js/helper-classes/3D/view-utils").ViewUtils;
71 var root = viewUtils.application.ninja.currentDocument.documentRoot; 71 //var root = viewUtils.application.ninja.currentDocument.documentRoot;
72 var root;
73 if (viewUtils.application.ninja.currentDocument)
74 root = viewUtils.application.ninja.currentDocument.model.documentRoot;
72 var srcCanvas = this._srcCanvas; 75 var srcCanvas = this._srcCanvas;
73 if (!srcCanvas) 76 if (!srcCanvas && root)
74 srcCanvas = this.findCanvas( this._texMapName, root ); 77 srcCanvas = this.findCanvas( this._texMapName, root );
75 if (srcCanvas) 78 if (srcCanvas)
76 { 79 {