Skip to content

Commit 4a3df6f

Browse files
committed
Small fix
1 parent a069186 commit 4a3df6f

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

leechcore_device_hvmm/leechcore_device_hvmm.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -341,11 +341,14 @@ VOID DeviceHVMM_Close(_Inout_ PLC_CONTEXT ctxLC)
341341
{
342342
PDEVICE_CONTEXT_HVMM ctx = (PDEVICE_CONTEXT_HVMM)ctxLC->hDevice;
343343

344-
if (0 == --g_cDeviceHVMM) {
345-
DeviceHVMM_SvcClose();
346-
}
344+
if (g_cDeviceHVMM > 0)
345+
g_cDeviceHVMM -= 1;
346+
347+
if (g_cDeviceHVMM)
348+
return;
347349

348-
if (ctx) {
350+
if (ctx)
351+
{
349352
SdkClosePartition((ULONG64)ctx->Partition);
350353

351354
if (ctx->hFile)

leechcore_device_hvmm/leechcore_device_hvmm.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@
236236
<AdditionalDependencies>$(SolutionDir)files\hvlib.lib;leechcore.lib;Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
237237
</Link>
238238
<PostBuildEvent>
239-
<Command>copy "$(OutDir)leechcore_device_hvmm.dll" "$(SolutionDir)files" /y</Command>
239+
<Command>copy "$(OutDir)leechcore_device_hvmm.dll" "$(SolutionDir)files\Release" /y</Command>
240240
</PostBuildEvent>
241241
</ItemDefinitionGroup>
242242
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">

0 commit comments

Comments
 (0)