Add another check to getProcessorSpeedMHz to prevent crashes on Unix when it's called with 0 parameter.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5535 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
c937fcf488
commit
213cb5a93f
|
@ -200,7 +200,7 @@ bool COSOperator::getProcessorSpeedMHz(u32* MHz) const
|
|||
}
|
||||
fclose(file);
|
||||
}
|
||||
return (*MHz != 0);
|
||||
return (MHz && *MHz != 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue