const OSSymbol * sym = OSSymbol::withCStringNoCopy(kIOHibernateRTCVariablesKey);
if (sym) {
- gIOOptionsEntry->removeProperty(sym);
+ if (gIOOptionsEntry->getProperty(sym)) {
+ gIOOptionsEntry->removeProperty(sym);
+ gIOOptionsEntry->sync();
+ }
sym->release();
}
}