Skip to content

Commit

Permalink
fix crash if canvas node is missed (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
minggo committed May 4, 2017
1 parent ddbe1cf commit 6c779b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Expand Up @@ -943,10 +943,11 @@ class FireParser {
}

to_json_setup_design_resolution() {
this._json_output.designResolution = {
w: this._state._design_resolution.width,
h: this._state._design_resolution.height
}
if (this._state._design_resolution)
this._json_output.designResolution = {
w: this._state._design_resolution.width,
h: this._state._design_resolution.height
}

this.resolutionFitWidth = state._fit_width;
this.resolutionFitHeight = state._fit_height;
Expand Down
Expand Up @@ -103,8 +103,6 @@ void CreatorReader::setup()
const float w = frameSize.width / (frameSize.width / designResolution->w());
const float h = frameSize.height / (frameSize.width / designResolution->w());
glview->setDesignResolutionSize(w, h, ResolutionPolicy::NO_BORDER);
} else {
glview->setDesignResolutionSize(designResolution->w(), designResolution->h(), ResolutionPolicy::NO_BORDER);
}

setupSpriteFrames();
Expand Down

0 comments on commit 6c779b1

Please sign in to comment.