Unverified Commit 768963ae authored by Peter Eastman's avatar Peter Eastman Committed by GitHub
Browse files

Fixed incorrect context handling (#3339)

parent dc879951
......@@ -421,12 +421,12 @@ CudaContext::~CudaContext() {
delete bonded;
if (nonbonded != NULL)
delete nonbonded;
if (contextIsValid && !isLinkedContext)
cuProfilerStop();
popAsCurrent();
string errorMessage = "Error deleting Context";
if (contextIsValid && !isLinkedContext) {
cuProfilerStop();
if (contextIsValid && !isLinkedContext)
cuCtxDestroy(context);
}
contextIsValid = false;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment