Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
ecdfdfe4
Commit
ecdfdfe4
authored
Feb 25, 2017
by
Don Gagne
Committed by
GitHub
Feb 25, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4614 from DonLakeFlyer/ShutdownCrash
Fix shutdown crash
parents
881fc349
d89f6b79
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
QGCApplication.cc
src/QGCApplication.cc
+10
-1
QGCApplication.h
src/QGCApplication.h
+6
-0
main.cc
src/main.cc
+1
-0
No files found.
src/QGCApplication.cc
View file @
ecdfdfe4
...
...
@@ -334,8 +334,12 @@ QGCApplication::QGCApplication(int &argc, char* argv[], bool unitTesting)
_toolbox
->
setChildToolboxes
();
}
QGCApplication
::~
QGCApplication
(
)
void
QGCApplication
::
_shutdown
(
void
)
{
// This code is specifically not in the destructor since the application object may not be available in the destructor.
// This cause problems for deleting object like settings which are in the toolbox which may have qml references. By
// moving them here and having main.cc call this prior to deleting the app object we make sure app object is still
// around while these things are shutting down.
#ifndef __mobile__
MainWindow
*
mainWindow
=
MainWindow
::
instance
();
if
(
mainWindow
)
{
...
...
@@ -346,6 +350,11 @@ QGCApplication::~QGCApplication()
delete
_toolbox
;
}
QGCApplication
::~
QGCApplication
()
{
// Place shutdown code in _shutdown
}
void
QGCApplication
::
_initCommon
(
void
)
{
QSettings
settings
;
...
...
src/QGCApplication.h
View file @
ecdfdfe4
...
...
@@ -152,6 +152,12 @@ public:
static
QGCApplication
*
_app
;
///< Our own singleton. Should be reference directly by qgcApp
public:
// Although public, these methods are internal and should only be called by UnitTest code
/// Shutdown the application object
void
_shutdown
(
void
);
private
slots
:
void
_missingParamsDisplay
(
void
);
...
...
src/main.cc
View file @
ecdfdfe4
...
...
@@ -253,6 +253,7 @@ int main(int argc, char *argv[])
exitCode
=
app
->
exec
();
}
app
->
_shutdown
();
delete
app
;
//-- Shutdown Cache System
destroyMapEngine
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment