setTexture()修改图片的问题,无法替换节点图片

this.node.getComponent( cc.Sprite ).spriteFrame.setTexture( this.tesetIMGURL )
为什么总是报错
CCScale9Sprite.js:1242 Uncaught TypeError: Cannot read property ‘height’ of null
at TheClass.setContentSize (CCScale9Sprite.js:1242)
at onResourceDataLoaded (CCScale9Sprite.js:1200)
at TheClass.setSpriteFrame (CCScale9Sprite.js:1206)
at cc_Sprite._onTextureLoaded (CCSprite.js:540)
at cc_Sprite._applySpriteFrame (CCSprite.js:559)
at cc_Sprite._initSgNode (CCSprite.js:585)
at cc_Sprite.__preload (CCRendererUnderSG.js:60)
at CCClass.eval [as _invoke] (eval at createInvokeImpl (component-scheduler.js:255), :3:65)
at CCClass.invoke (node-activator.js:65)
at CCClass.activateNode (node-activator.js:225)
后来直接改成 this.node.getComponent( cc.Sprite ).spriteFrame = this.testSpriteFrame然后可以了。很奇怪啊,不能直接使用setTexture()吗?