mirror of
https://github.com/photonstorm/phaser
synced 2024-11-21 20:23:19 +00:00
The NineSlice
Game Object will now guard against an invalid texture by checking for the frame
and textureFrame
vars before trying to read values from them. Fix #6804
This commit is contained in:
parent
3041dabe9e
commit
c308c430c3
1 changed files with 2 additions and 2 deletions
|
@ -312,7 +312,7 @@ var NineSlice = new Class({
|
|||
*/
|
||||
this.is3Slice = (!topHeight && !bottomHeight);
|
||||
|
||||
if (textureFrame.scale9)
|
||||
if (textureFrame && textureFrame.scale9)
|
||||
{
|
||||
// If we're using the scale9 data from the frame, override the values from above
|
||||
this.is3Slice = textureFrame.is3Slice;
|
||||
|
@ -382,7 +382,7 @@ var NineSlice = new Class({
|
|||
}
|
||||
else
|
||||
{
|
||||
if (frame.scale9 && !skipScale9)
|
||||
if (frame && frame.scale9 && !skipScale9)
|
||||
{
|
||||
var data = frame.data.scale9Borders;
|
||||
|
||||
|
|
Loading…
Reference in a new issue