]> git.saurik.com Git - apple/xnu.git/blobdiff - iokit/Kernel/IOHibernateIO.cpp
xnu-1228.7.58.tar.gz
[apple/xnu.git] / iokit / Kernel / IOHibernateIO.cpp
index 030368a72f658f89d554758773eb209f515db31a..ae66cb9b8a91f1deb1f1ca66c46fdd48ad61896d 100644 (file)
@@ -1598,7 +1598,10 @@ IOHibernateSystemWake(void)
                const OSSymbol * sym = OSSymbol::withCStringNoCopy(kIOHibernateRTCVariablesKey);
 
                if (sym) {
                const OSSymbol * sym = OSSymbol::withCStringNoCopy(kIOHibernateRTCVariablesKey);
 
                if (sym) {
-                       gIOOptionsEntry->removeProperty(sym);
+                       if (gIOOptionsEntry->getProperty(sym)) {
+                               gIOOptionsEntry->removeProperty(sym);
+                               gIOOptionsEntry->sync();
+                       }
                        sym->release();
                }
        }
                        sym->release();
                }
        }