File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 149149 w = locWidth * scaleX ;
150150 h = locHeight * scaleY ;
151151
152- if ( texture ) {
152+ if ( texture && texture . _htmlElementObj ) {
153153 image = texture . _htmlElementObj ;
154154 if ( texture . _pattern !== "" ) {
155155 wrapper . setFillStyle ( context . createPattern ( image , texture . _pattern ) ) ;
Original file line number Diff line number Diff line change @@ -124,13 +124,17 @@ cc.profiler = (function () {
124124 this . init ( ) ;
125125 }
126126
127- cc . container . appendChild ( _fps ) ;
127+ if ( _fps . parentElement === null ) {
128+ cc . container . appendChild ( _fps ) ;
129+ }
128130 _showFPS = true ;
129131 } ,
130132
131133 hideStats : function ( ) {
132134 _showFPS = false ;
133- cc . container . removeChild ( _fps ) ;
135+ if ( _fps . parentElement === cc . container ) {
136+ cc . container . removeChild ( _fps ) ;
137+ }
134138 } ,
135139
136140 init : function ( ) {
You can’t perform that action at this time.
0 commit comments