Make sure all variables are non zero #5030

This commit is contained in:
Jerry (Xinyu Hou) 2015-10-19 11:28:23 -07:00
parent a09bfc5f07
commit c994b0a4f7
1 changed files with 4 additions and 1 deletions

View File

@ -29,7 +29,10 @@ size_t DpiHelper::s_primaryHeightCenter = 0;
void DpiHelper::calculateDpi(size_t width, size_t height) 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; return;
} }