Merge pull request #1 from phaicm/master

Temp Fix Potential Crash and Decorator
This commit is contained in:
Tad William 2020-06-24 08:33:19 +08:00 committed by GitHub
commit 40a914f0ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 5 deletions

View File

@ -29,7 +29,15 @@ inline void generate_pLink_in_pIn(CKContext* ctx, CKParameterIn* cache, scriptDa
//WARNING: untested doe to GetClassID() may have chance to return Attributes or CKDataArray accoring to document //WARNING: untested doe to GetClassID() may have chance to return Attributes or CKDataArray accoring to document
if (helper->_db_pLink->input_is_bb = (ds_Owner->GetClassID() != CKCID_PARAMETEROPERATION)) { if (helper->_db_pLink->input_is_bb = (ds_Owner->GetClassID() != CKCID_PARAMETEROPERATION)) {
//bb //bb
helper->_db_pLink->input_index = ((CKBehavior*)ds_Owner)->GetOutputParameterPosition((CKParameterOut*)directSource); __try
{
helper->_db_pLink->input_index = ((CKBehavior*)ds_Owner)->GetOutputParameterPosition((CKParameterOut*)directSource);
}
__except (EXCEPTION_EXECUTE_HANDLER)
{
//Default to 0
helper->_db_pLink->input_index = 0;
}
} else { } else {
//pOper //pOper

View File

@ -505,10 +505,16 @@ def buildCell(exDb, deDb, target, currentGraphBlockCell):
exCur.execute("SELECT [name], [type] FROM {} WHERE [thisobj] == ?".format(tableName), (i,)) exCur.execute("SELECT [name], [type] FROM {} WHERE [thisobj] == ?".format(tableName), (i,))
temp = exCur.fetchone() temp = exCur.fetchone()
# submit to database and map if temp is not None:
currentGraphBlockCell[i] = dcv.BlockCellItem(x, y, dcv.CELL_WIDTH, dcv.CELL_HEIGHT) # submit to database and map
deCur.execute("INSERT INTO cell VALUES (?, ?, ?, ?, ?, ?, ?)", currentGraphBlockCell[i] = dcv.BlockCellItem(x, y, dcv.CELL_WIDTH, dcv.CELL_HEIGHT)
(target, i, temp[0], temp[1], x, y, (dcv.CellType.SHORTCUT if cache.isshortcut else dcv.CellType.PLOCAL))) deCur.execute("INSERT INTO cell VALUES (?, ?, ?, ?, ?, ?, ?)",
(target, i, temp[0], temp[1], x, y, (dcv.CellType.SHORTCUT if cache.isshortcut else dcv.CellType.PLOCAL)))
else:
# submit to database and map
currentGraphBlockCell[i] = dcv.BlockCellItem(x, y, dcv.CELL_WIDTH, dcv.CELL_HEIGHT)
deCur.execute("INSERT INTO cell VALUES (?, ?, ?, ?, ?, ?, ?)",
(target, i, "UNKNOWN", "UNKNOWN", x, y, (dcv.CellType.SHORTCUT if cache.isshortcut else dcv.CellType.PLOCAL)))
# comput size and update database and currentGraphBlockCell # comput size and update database and currentGraphBlockCell
graphX = 0 graphX = 0