File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed 
src/detection/displayserver Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ static void detectDisplays(FFDisplayServerResult* ds)
150150                }
151151                #endif 
152152
153-                 if  (display -> type  ==  FF_DISPLAY_TYPE_BUILTIN )
153+                 if  (display -> type  ==  FF_DISPLAY_TYPE_BUILTIN   &&   displayInfo )
154154                    display -> hdrStatus  =  CFDictionaryContainsKey (displayInfo , CFSTR ("ReferencePeakHDRLuminance" ))
155155                        ? FF_DISPLAY_HDR_STATUS_SUPPORTED  : FF_DISPLAY_HDR_STATUS_UNSUPPORTED ;
156156                #ifdef  MAC_OS_X_VERSION_10_15 
@@ -168,11 +168,15 @@ static void detectDisplays(FFDisplayServerResult* ds)
168168                #endif 
169169
170170                display -> serial  =  CGDisplaySerialNumber (screen );
171-                 int  value ;
172-                 if  (ffCfDictGetInt (displayInfo , CFSTR (kDisplayYearOfManufacture ), & value ) ==  NULL )
173-                     display -> manufactureYear  =  (uint16_t ) value ;
174-                 if  (ffCfDictGetInt (displayInfo , CFSTR (kDisplayWeekOfManufacture ), & value ) ==  NULL )
175-                     display -> manufactureWeek  =  (uint16_t ) value ;
171+ 
172+                 if  (displayInfo )
173+                 {
174+                     int  value ;
175+                     if  (ffCfDictGetInt (displayInfo , CFSTR (kDisplayYearOfManufacture ), & value ) ==  NULL )
176+                         display -> manufactureYear  =  (uint16_t ) value ;
177+                     if  (ffCfDictGetInt (displayInfo , CFSTR (kDisplayWeekOfManufacture ), & value ) ==  NULL )
178+                         display -> manufactureWeek  =  (uint16_t ) value ;
179+                 }
176180            }
177181            CGDisplayModeRelease (mode );
178182        }
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments