Skip to content

Commit

Permalink
app_python: check if f_code field in frame is set before using in log…
Browse files Browse the repository at this point in the history
… message

(cherry picked from commit b02c247)
(cherry picked from commit ed1fb65)
  • Loading branch information
miconda committed Jul 16, 2020
1 parent 5920bc0 commit a456847
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modules/app_python/apy_kemi.c
Expand Up @@ -780,9 +780,9 @@ PyObject *sr_apy_kemi_exec_func(PyObject *self, PyObject *args, int idx)
" took too long [%u us] (file:%s func:%s line:%d)\n",
(ket->mname.len>0)?ket->mname.s:"",
(ket->mname.len>0)?".":"", ket->fname.s, tdiff,
(pframe)?PyString_AsString(pframe->f_code->co_filename):"",
(pframe)?PyString_AsString(pframe->f_code->co_name):"",
(pframe)?PyCode_Addr2Line(pframe->f_code, pframe->f_lasti):0);
(pframe && pframe->f_code)?PyString_AsString(pframe->f_code->co_filename):"",
(pframe && pframe->f_code)?PyString_AsString(pframe->f_code->co_name):"",
(pframe && pframe->f_code)?PyCode_Addr2Line(pframe->f_code, pframe->f_lasti):0);
}
}

Expand Down

0 comments on commit a456847

Please sign in to comment.