Browse Source

task: fix double free when failing to retrieve coroutine exception

rdb 7 years ago
parent
commit
b45726001e
1 changed files with 3 additions and 0 deletions
  1. 3 0
      panda/src/event/pythonTask.cxx

+ 3 - 0
panda/src/event/pythonTask.cxx

@@ -94,6 +94,9 @@ PythonTask::
     PyErr_Restore(_exception, _exc_value, _exc_traceback);
     PyErr_Print();
     PyErr_Restore(nullptr, nullptr, nullptr);
+    _exception = nullptr;
+    _exc_value = nullptr;
+    _exc_traceback = nullptr;
   }
 #endif