mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
bug 13041: Fix potential NPE
I haven't figure out why the code can NPE, and in my test the clean up of basic zone is prevent from API as expected. Anyway, I add this check before cleanup to ensure even API check failed, no NPE would be throwed. status 13041: resolved fixed.
This commit is contained in:
parent
08636d5802
commit
ab667cbc16
@ -3111,6 +3111,10 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
||||
ReservationContext context = new ReservationContextImpl(null, null, callerUser, callerAccount);
|
||||
|
||||
if (cleanup) {
|
||||
if (network.getGuestType() != GuestType.Isolated) {
|
||||
s_logger.warn("Only support clean up network for isolated network!");
|
||||
return false;
|
||||
}
|
||||
//shutdown the network
|
||||
s_logger.debug("Shutting down the network id=" + networkId + " as a part of network restart");
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user