diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-07-01 21:12:26 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-07-02 10:15:22 +0200 |
commit | f4d6a3a7142f2f11e8c58b9fb32d05f66fa69685 (patch) | |
tree | 8a31350b8fc7e3d5fe0a092436ba44684b96086c /vcl/source/gdi | |
parent | a80e607b65662393f93e896ba7925f67150149da (diff) |
tdf#143149 fix crash if app exits while print progress is running
dismiss the dialog if its parent goes away, but leave the print
job running
Change-Id: Ic29ee0300a7d9476ad27a2594a555312e30c74f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118253
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/gdi')
-rw-r--r-- | vcl/source/gdi/print3.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index fbbde7b5d770..d4518bba4889 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -779,6 +779,17 @@ weld::Window* PrinterController::getWindow() const return mpImplData->mpWindow; } +void PrinterController::dialogsParentClosing() +{ + mpImplData->mpWindow = nullptr; + if (mpImplData->mxProgress) + { + // close the dialog without doing anything, just get rid of it + mpImplData->mxProgress->response(RET_OK); + mpImplData->mxProgress.reset(); + } +} + void PrinterController::setPrinter( const VclPtr<Printer>& i_rPrinter ) { VclPtr<Printer> xPrinter = mpImplData->mxPrinter; |