diff options
| author | Thomas Holder <thomas@thomas-holder.de> | 2019-08-14 09:32:23 +0000 |
|---|---|---|
| committer | Thomas Holder <thomas@thomas-holder.de> | 2019-08-14 09:44:20 +0000 |
| commit | c41b8618d6e0494f131ad917b6761d51ff73c479 (patch) | |
| tree | 1c64a5f712717cc066929350dba95cfe26581567 /src/inkscape-application.cpp | |
| parent | fix #383 macOS "ask to save" on CMD+Q (diff) | |
| download | inkscape-c41b8618d6e0494f131ad917b6761d51ff73c479.tar.gz inkscape-c41b8618d6e0494f131ad917b6761d51ff73c479.zip | |
fix "File > Quit" heap-use-after-free
`it->second` may be invalid after `destroy_window`
Diffstat (limited to 'src/inkscape-application.cpp')
| -rw-r--r-- | src/inkscape-application.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/inkscape-application.cpp b/src/inkscape-application.cpp index e32f31c03..e2f4b453f 100644 --- a/src/inkscape-application.cpp +++ b/src/inkscape-application.cpp @@ -853,7 +853,7 @@ ConcreteInkscapeApplication<Gtk::Application>::destroy_all() { while (_documents.size() != 0) { auto it = _documents.begin(); - while (it->second.size() != 0) { + if (!it->second.empty()) { auto it2 = it->second.begin(); if (!destroy_window (*it2)) return; // If destroy aborted, we need to stop exit. } |
