mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fix usage of QString::toUtf8(). Fixes #2299
Desktop runtime has a couple bugs using already freed memory supplied to embedded python leading to occasional crashes and failures to start maintenance processes (VACUUM, ANALYZE, REINDEX, CLUSTER). This is caused by incorrect usage of QString::toUtf8() which returns newly created QByteArray which is automatically destroyed once closing context; e.g. Py_SetPythonHome(pythonHome.toUtf8().data());
This commit is contained in:
committed by
Dave Page
parent
f19fc307b1
commit
72548a99e1
@@ -40,7 +40,12 @@ private:
|
||||
|
||||
quint16 m_port;
|
||||
QString m_key;
|
||||
// Application name in UTF-8 for Python
|
||||
wchar_t *m_wcAppName;
|
||||
QByteArray PGA_APP_NAME_UTF8;
|
||||
// PythonHome for Python
|
||||
wchar_t *m_wcPythonHome;
|
||||
QByteArray pythonHome_utf8;
|
||||
};
|
||||
|
||||
#endif // SERVER_H
|
||||
|
||||
Reference in New Issue
Block a user