mirror of https://github.com/apache/cloudstack.git
Fixed null pointer in ServerContexts
This commit is contained in:
parent
8d21f49ec9
commit
78fa5e14ee
|
|
@ -40,9 +40,11 @@ public class ServerContexts {
|
|||
|
||||
public static void unregisterUserContext() {
|
||||
CallContext context = CallContext.unregister();
|
||||
AsyncJobExecutionContext.unregister();
|
||||
Transaction txn = (Transaction)context.getContextParameter("Transaction");
|
||||
txn.close(Thread.currentThread().getName());
|
||||
if (context != null) {
|
||||
AsyncJobExecutionContext.unregister();
|
||||
Transaction txn = (Transaction)context.getContextParameter("Transaction");
|
||||
txn.close(Thread.currentThread().getName());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue