@magic-xpa/gui 4.900.0-dev490.100 → 4.900.0-dev490.103

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13542,15 +13542,17 @@ class MgControlBase extends GuiControlPropertyAdapter {
13542
13542
  return __awaiter(this, void 0, void 0, function* () {
13543
13543
  if (this.isTextControl() && this.checkIfExistProp(PropInterface.PROP_TYPE_CONNECTED_ZOOM_CONTROL)) {
13544
13544
  let connectedButton = this.Form.CtrlTab.GetControlByIsn((yield (yield this.getProp(PropInterface.PROP_TYPE_CONNECTED_ZOOM_CONTROL)).getValueInt()));
13545
- let imageFileName = null;
13546
- if (connectedButton.IsImageButton() && connectedButton.PropertyExists(PropInterface.PROP_TYPE_IMAGE_FILENAME)) {
13547
- imageFileName = yield (yield connectedButton.getProp(PropInterface.PROP_TYPE_IMAGE_FILENAME)).getValue();
13548
- if (!Misc.IsWebUrl(imageFileName))
13549
- imageFileName = "./assets/images/" + imageFileName;
13550
- Commands.addOperationWithLine(CommandType.SET_STYLE, this, 0, MagicProperties.ImageFile, imageFileName);
13551
- }
13552
- this.ConnectedControl = connectedButton;
13553
- connectedButton.ConnectedControl = this;
13545
+ if (connectedButton) {
13546
+ let imageFileName = null;
13547
+ if (connectedButton.IsImageButton() && connectedButton.PropertyExists(PropInterface.PROP_TYPE_IMAGE_FILENAME)) {
13548
+ imageFileName = yield (yield connectedButton.getProp(PropInterface.PROP_TYPE_IMAGE_FILENAME)).getValue();
13549
+ if (!Misc.IsWebUrl(imageFileName))
13550
+ imageFileName = "./assets/images/" + imageFileName;
13551
+ Commands.addOperationWithLine(CommandType.SET_STYLE, this, 0, MagicProperties.ImageFile, imageFileName);
13552
+ }
13553
+ this.ConnectedControl = connectedButton;
13554
+ connectedButton.ConnectedControl = this;
13555
+ }
13554
13556
  }
13555
13557
  });
13556
13558
  }