From c11f8a07e478ba333379093172182a32b542ede4 Mon Sep 17 00:00:00 2001 From: boyce <6549168@qq.com> Date: Wed, 31 Jul 2019 11:44:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A4=E6=96=ADModule=E5=B7=B2=E7=BB=8F?= =?UTF-8?q?=E8=A2=AB=E9=87=8A=E6=94=BE=E6=97=B6=EF=BC=8C=E5=86=8D=E6=AC=A1?= =?UTF-8?q?=E9=87=8A=E6=94=BE=E4=BC=9A=E5=87=BA=E7=8E=B0=E7=A9=BA=E6=83=85?= =?UTF-8?q?=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/Module.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/service/Module.go b/service/Module.go index 018a7b2..045afef 100644 --- a/service/Module.go +++ b/service/Module.go @@ -163,6 +163,10 @@ func (slf *BaseModule) ReleaseModule(moduleId uint32) bool { //locker := slf.GetRoot().getBaseModule().getLocker() locker := baseModule.getLocker() + if locker == nil { + return false + } + locker.Lock() slf.releaseModule(moduleId) locker.Unlock()