diff options
author | Emanoil Kotsev <deloptes@gmail.com> | 2022-09-18 12:19:01 +0000 |
---|---|---|
committer | Emanoil Kotsev <deloptes@gmail.com> | 2022-09-18 18:55:29 +0000 |
commit | bab378b17c39dd3f0e1e57863ebf4f29f7f4d346 (patch) | |
tree | 5cf52e9fe91fe1c3211a3e80bc07e85f729ac4e5 | |
parent | 7293390eed58df44ffef7023583f870bb240df1e (diff) | |
download | krecipes-bab378b17c39dd3f0e1e57863ebf4f29f7f4d346.tar.gz krecipes-bab378b17c39dd3f0e1e57863ebf4f29f7f4d346.zip |
Prevent crashing from ntqvaluelist in ~TQApplication, when closing the app
Signed-off-by: Emanoil Kotsev <deloptes@gmail.com>
-rw-r--r-- | krecipes/src/krecipesview.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/krecipes/src/krecipesview.cpp b/krecipes/src/krecipesview.cpp index 7a611bc..17eb312 100644 --- a/krecipes/src/krecipesview.cpp +++ b/krecipes/src/krecipesview.cpp @@ -291,10 +291,13 @@ KrecipesView::KrecipesView( TQWidget *parent ) KrecipesView::~KrecipesView() { - delete buttonsList; - delete viewPanel; //manually delete viewPanel because we need to be sure it is deleted + if (buttonsList) + delete buttonsList; + if (viewPanel) + delete viewPanel; //manually delete viewPanel because we need to be sure it is deleted //before the database is because its destructor uses 'database' - delete database; + if (database) + delete database; } bool KrecipesView::questionRerunWizard( const TQString &message, const TQString &error ) |