mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Initialize client's name in main()
Initializing clientName at declaration time is not a good idea.
Spotted by Coverity scan.
(cherry picked from commit 3d323412ad
)
This commit is contained in:
parent
615f035854
commit
2c5f284f89
@ -460,8 +460,7 @@ int h(vector<docstring> const &)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
docstring clientName =
|
docstring clientName;
|
||||||
from_ascii(to_string(::getppid()) + ">" + to_string(::getpid()));
|
|
||||||
|
|
||||||
int n(vector<docstring> const & arg)
|
int n(vector<docstring> const & arg)
|
||||||
{
|
{
|
||||||
@ -710,9 +709,12 @@ int LyXClientApp::run()
|
|||||||
|
|
||||||
int main(int argc, char * argv[])
|
int main(int argc, char * argv[])
|
||||||
{
|
{
|
||||||
lyx::lyxerr.setStream(cerr);
|
using namespace lyx;
|
||||||
|
lyxerr.setStream(cerr);
|
||||||
|
cmdline::clientName =
|
||||||
|
from_ascii(to_string(::getppid()) + ">" + to_string(::getpid()));
|
||||||
|
|
||||||
lyx::LyXClientApp app(argc, argv);
|
LyXClientApp app(argc, argv);
|
||||||
return app.exec();
|
return app.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,6 +141,8 @@ What's new
|
|||||||
|
|
||||||
- Fix case where debug information may report all numbers as hexadecimal.
|
- Fix case where debug information may report all numbers as hexadecimal.
|
||||||
|
|
||||||
|
- Make sure that lyxclient name is initialized properly.
|
||||||
|
|
||||||
|
|
||||||
* DOCUMENTATION AND LOCALIZATION
|
* DOCUMENTATION AND LOCALIZATION
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user