Skip to content

Commit caeb45f

Browse files
authored
Merge pull request #545 from elsassph/race-condition-checkls
Small robustness improvement
2 parents 66fce59 + 1862ca1 commit caeb45f

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/flex/FlexTarget.mjs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,11 @@ export default class FlexTarget {
159159

160160
_enableFlexItem() {
161161
this._ensureFlexItem();
162-
const flexParent = this._target._parent._layout;
163-
this._flexItem.ctr = flexParent._flex;
164-
flexParent.changedContents();
162+
if (this._target._parent) {
163+
const flexParent = this._target._parent._layout;
164+
this._flexItem.ctr = flexParent._flex;
165+
flexParent.changedContents();
166+
}
165167
this._checkEnabled();
166168
}
167169

src/renderer/c2d/shaders/DefaultShader.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export default class DefaultShader extends C2dShader {
3333
let length = operation.length;
3434
for (let i = 0; i < length; i++) {
3535
const tx = operation.getTexture(i);
36+
if (!tx) continue;
3637
const vc = operation.getElementCore(i);
3738
const rc = operation.getRenderContext(i);
3839
const white = operation.getWhite(i);

0 commit comments

Comments
 (0)