Skip to content

Commit

Permalink
Be sure model isn't empty
Browse files Browse the repository at this point in the history
  • Loading branch information
balr0g committed Aug 9, 2012
1 parent 87aba4b commit 2d9970e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Resources/Plugins/System Profiler/TPI_SP_SysInfo.m
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ + (NSString *)graphicsCardInfo
const void *model = CFDictionaryGetValue(serviceDictionary, @"model");

if (PointerIsNotEmpty(model)) {
if (CFGetTypeID(model) == CFDataGetTypeID()) {
if (CFGetTypeID(model) == CFDataGetTypeID() && CFDataGetLength(model) > 1) {
NSString *s = [NSString stringWithBytes:[(__bridge NSData *)model bytes] length:(CFDataGetLength(model)-1)
encoding:NSASCIIStringEncoding];

Expand Down

0 comments on commit 2d9970e

Please sign in to comment.