Make sure all variables are non zero #5030
This commit is contained in:
parent
a09bfc5f07
commit
c994b0a4f7
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue