Skip to content

Commit 33c31f4

Browse files
committed
Code cleanup - Add missing bracers
1 parent 6913334 commit 33c31f4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Installer.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,9 @@ Package GetSparsePackage()
209209
HRESULT NppShell::Installer::RegisterSparsePackage()
210210
{
211211
if (::GetSystemMetrics(SM_CLEANBOOT) > 0)
212+
{
212213
return S_FALSE; // Otherwise we will get an unhandled exception later due to HRESULT 0x8007043c (ERROR_NOT_SAFEBOOT_SERVICE).
214+
}
213215

214216
PackageManager packageManager;
215217
AddPackageOptions options;
@@ -236,7 +238,9 @@ HRESULT NppShell::Installer::RegisterSparsePackage()
236238
HRESULT NppShell::Installer::UnregisterSparsePackage()
237239
{
238240
if (::GetSystemMetrics(SM_CLEANBOOT) > 0)
241+
{
239242
return S_FALSE; // Only to speed up things a bit here. (code in the following GetSparsePackage() is safe against the ERROR_NOT_SAFEBOOT_SERVICE)
243+
}
240244

241245
PackageManager packageManager;
242246
IIterable<Package> packages;
@@ -298,7 +302,9 @@ HRESULT NppShell::Installer::UnregisterOldContextMenu()
298302
void ReRegisterSparsePackage()
299303
{
300304
if (::GetSystemMetrics(SM_CLEANBOOT) > 0)
305+
{
301306
return; // Sparse package reg/unreg cannot be done in the Windows OS SafeMode.
307+
}
302308

303309
winrt::init_apartment();
304310

0 commit comments

Comments
 (0)