Skip to content

Commit

Permalink
[skip ci] fixed callback error crash
Browse files Browse the repository at this point in the history
  • Loading branch information
hoffstadt committed Feb 1, 2021
1 parent c0524d1 commit dec6044
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
8 changes: 7 additions & 1 deletion DearPyGui/src/core/PythonUtilities/mvPythonExceptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ namespace Marvel

std::string fullMessage = "Line: %d \t" + message;

int line = PyFrame_GetLineNumber(PyEval_GetFrame());
int line = 0;
auto f = PyEval_GetFrame();
if (f)
line = PyFrame_GetLineNumber(f);
else
fullMessage.append(" || error occured in a callback");

PyErr_Format(PyExc_Exception, fullMessage.c_str(), line);
PyErr_Print();
}
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 0.6.{build}

branches:
only:
- master
- 0.6.x
build:
verbosity: minimal

Expand Down
6 changes: 4 additions & 2 deletions docs/CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ HOW TO UPDATE?
- Please report any issue!

------------------------------------------------------------------------
VERSION 0.7.x
VERSION 0.6.x
------------------------------------------------------------------------

Decorated log: https://github.com/hoffstadt/DearPyGui/releases/tag/v0.7.x
Fixes:
- callback_error: prevent callback error crash
- set_color_map crash #512

------------------------------------------------------------------------
VERSION 0.6.151
Expand Down

0 comments on commit dec6044

Please sign in to comment.