mirror of
https://github.com/debauchee/barrier.git
synced 2026-11-27 06:12:17 +08:00
Make sure all variables are non zero #5030
This commit is contained in:
@@ -29,7 +29,10 @@ size_t DpiHelper::s_primaryHeightCenter = 0;
|
||||
|
||||
void DpiHelper::calculateDpi(size_t width, size_t height)
|
||||
{
|
||||
if (s_resolutionWidth == 0 || s_resolutionHeight == 0) {
|
||||
if (s_resolutionWidth == 0 ||
|
||||
s_resolutionHeight == 0 ||
|
||||
s_primaryWidthCenter == 0 ||
|
||||
s_primaryHeightCenter == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user