diff libgui/graphics/GLCanvas.cc @ 27481:458adc344819

avoid possible crash due to execution_exception in GUI thread * GLCanvas.cc (GLCanvas::do_print): Use throw with captured exception object instead of std::rethrow_exception (std::current_exception ()). * octave-qobject.cc (octave_qapplication::notify): Likewise. * oct-parse.yy (parser::run): Simply rethrow execution_exception instead of trying to convert to parse error.
author John W. Eaton <jwe@octave.org>
date Mon, 07 Oct 2019 14:36:01 -0400
parents f844b1f03dcc
children 028205a91a07
line wrap: on
line diff
--- a/libgui/graphics/GLCanvas.cc	Sun Oct 06 16:30:35 2019 -0400
+++ b/libgui/graphics/GLCanvas.cc	Mon Oct 07 14:36:01 2019 -0400
@@ -180,14 +180,14 @@
                 fbo.release ();
               }
           }
-        catch (octave::execution_exception& e)
+        catch (octave::execution_exception& ee)
           {
             emit interpreter_event
-              ([] (void)
+              ([ee] (void)
                {
                  // INTERPRETER THREAD
 
-                 std::rethrow_exception (std::current_exception ());
+                 throw ee;
                });
           }