mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 02:14:50 +00:00
Replace crash on startup with a memory leak.
* src/frontends/qt[34]/GuiApplication.C (lyx::frontend::Application * createApplication): Don't return the address of a temporary, but use the new operator. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15313 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b0297263df
commit
0891c2e99a
@ -79,9 +79,7 @@ namespace lyx {
|
||||
|
||||
frontend::Application * createApplication(int & argc, char * argv[])
|
||||
{
|
||||
frontend::GuiApplication app(argc, argv);
|
||||
|
||||
return &app;
|
||||
return new frontend::GuiApplication(argc, argv);
|
||||
}
|
||||
|
||||
namespace frontend {
|
||||
|
@ -80,11 +80,10 @@ lyx::frontend::Application * createApplication(int & argc, char * argv[])
|
||||
|
||||
#if defined(Q_WS_WIN) && !defined(Q_CYGWIN_WIN)
|
||||
static lyx::frontend::GuiApplication app(argc, argv);
|
||||
#else
|
||||
lyx::frontend::GuiApplication app(argc, argv);
|
||||
#endif
|
||||
|
||||
return &app;
|
||||
#else
|
||||
return new lyx::frontend::GuiApplication(argc, argv);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user