don't crash when destroying a not initialized socket (patch 1489095)
[wxWidgets.git] / src / msw / window.cpp
index ac67acc1a749c700215d64957c340716dee5586b..a28f4c0901cc77285d157a2f6cc54229c15c5a64 100644 (file)
 #endif
 
 #include <commctrl.h>
+#include <pbt.h>
 
 #include "wx/msw/missing.h"
 
@@ -3829,7 +3830,9 @@ bool wxWindowMSW::HandlePower(WXWPARAM wParam,
         case PBT_APMBATTERYLOW:
         case PBT_APMPOWERSTATUSCHANGE:
         case PBT_APMOEMEVENT:
+#ifdef PBT_APMRESUMEAUTOMATIC
         case PBT_APMRESUMEAUTOMATIC:
+#endif
         case PBT_APMRESUMECRITICAL:
             evtType = wxEVT_NULL;
             break;