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:
Georg Baum 2006-10-12 19:40:04 +00:00
parent b0297263df
commit 0891c2e99a
2 changed files with 4 additions and 7 deletions

View File

@ -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 {

View File

@ -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
}