Skip to content

Commit

Permalink
fix: crash bug
Browse files Browse the repository at this point in the history
when releasing device enumerator while it was using.
  • Loading branch information
khanhas committed Oct 11, 2018
1 parent a196e92 commit f059d01
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions AppVolume/AppVolume.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ void SeparateList(LPCWSTR list, std::vector<std::wstring> &vectorList)
ParentMeasure::~ParentMeasure()
{
ClearSessions();
SAFE_RELEASE(pEnumerator);
}

BOOL ParentMeasure::InitializeCOM()
Expand All @@ -56,7 +55,8 @@ BOOL ParentMeasure::InitializeCOM()
return false;
}

if (FAILED(CoCreateInstance(
if (pEnumerator == nullptr
&& FAILED(CoCreateInstance(
CLSID_MMDeviceEnumerator,
0,
CLSCTX_ALL,
Expand Down
Binary file modified AppVolume/AppVolume.rc
Binary file not shown.
4 changes: 2 additions & 2 deletions AppVolume/skinDefinition.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "AppVolume Example Skins",
"author": "khanhas",
"version": "1.2.0",
"version": "1.2.2",
"minimumVersion": "4.1",
"minimumWindows": "5.1",
"output": "./dist/AppVolume_1.2.0.rmskin",
"output": "./dist/AppVolume_1.2.2.rmskin",
"skinDir": "../AppVolumeExampleSkin",
"configPrefix": "AppVolumeExample",
"headerImage": "./header.bmp",
Expand Down

0 comments on commit f059d01

Please sign in to comment.