diff --git a/mods/classic-taskbar-background-fix.wh.cpp b/mods/classic-taskbar-background-fix.wh.cpp index 32c7f299d..bd59c9283 100644 --- a/mods/classic-taskbar-background-fix.wh.cpp +++ b/mods/classic-taskbar-background-fix.wh.cpp @@ -67,6 +67,7 @@ I would like to thank @Anixx for testing the mod during its development and illu #include #include +#include //std::nothrow #include #include @@ -321,7 +322,7 @@ void ConditionalFillRect(HDC hdc, const RECT& rect, COLORREF oldColor, COLORREF bmi.bmiHeader.biBitCount = 32; //32-bit color depth bmi.bmiHeader.biCompression = BI_RGB; - COLORREF* pixels = new COLORREF[pixelCount]; + COLORREF* pixels = new(std::nothrow) COLORREF[pixelCount]; if (!pixels) { Wh_Log(L"Allocating pixels array failed"); }