Skip to content

Commit

Permalink
Fix nullptr crash in error message
Browse files Browse the repository at this point in the history
  • Loading branch information
usiems committed Jun 27, 2024
1 parent 10ece07 commit cce9d46
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/PythonQtConversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,9 @@ QString PythonQtConv::PyObjGetRepresentation(PyObject* val)
QString PythonQtConv::PyObjGetString(PyObject* val, bool strict, bool& ok) {
QString r;
ok = true;
if (val == nullptr) {
r = "None";
} else
#ifndef PY3K
// in Python 3, we don't want to convert to QString, since we don't know anything about the encoding
// in Python 2, we assume the default for str is latin-1
Expand Down

0 comments on commit cce9d46

Please sign in to comment.