Skip to content

Commit

Permalink
Fix segmentation fault in Config_EMB_RES
Browse files Browse the repository at this point in the history
  • Loading branch information
m-meingast authored and azoitl committed Nov 27, 2024
1 parent c734ca1 commit 38af284
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/stdfblib/ita/Config_EMB_RES.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ const SFBInterfaceSpec Config_EMB_RES::scmFBInterfaceSpec = {
Config_EMB_RES::Config_EMB_RES(CStringDictionary::TStringId paInstanceNameId, forte::core::CFBContainer &paDevice) :
CResource(paDevice, scmFBInterfaceSpec, paInstanceNameId),
fb_START(g_nStringIdSTART, *this),
var_OPCUA_Namespace(){
var_OPCUA_Namespace(),
conn_opcua_namespace(nullptr) {
}

Config_EMB_RES::~Config_EMB_RES() = default;
Expand All @@ -52,6 +53,9 @@ CIEC_ANY *Config_EMB_RES::getDI(const size_t paIndex) {
return nullptr;
}

CDataConnection **Config_EMB_RES::getDIConUnchecked(const TPortId) {
CDataConnection **Config_EMB_RES::getDIConUnchecked(const TPortId paIndex) {
switch(paIndex) {
case 0: return &conn_opcua_namespace;
}
return nullptr;
}
2 changes: 2 additions & 0 deletions src/stdfblib/ita/Config_EMB_RES.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ class Config_EMB_RES : public CResource {

CIEC_WSTRING var_OPCUA_Namespace;

CDataConnection *conn_opcua_namespace;

static const SFBInterfaceSpec scmFBInterfaceSpec;

static const CStringDictionary::TStringId scmVarInputNameIds[];
Expand Down

0 comments on commit 38af284

Please sign in to comment.