index dd91fe51f0527d2fc1ab11ec553abaaa64843724..7d8961f4a447778ac74bd6792f3ae0c626b20375 100644 (file)
@@ -52,6 +52,7 @@ static BOOL WINAPI pg_console_handler(DWORD dwCtrlType);
void
pg_usleep(long microsec)
{
+ Assert(pgwin32_signal_event != NULL);
if (WaitForSingleObject(pgwin32_signal_event,
(microsec < 500 ? 1 : (microsec + 500) / 1000))
== WAIT_OBJECT_0)
{
int exec_mask;
+ Assert(pgwin32_signal_event != NULL);
EnterCriticalSection(&pg_signal_crit_sec);
while ((exec_mask = UNBLOCKED_SIGNAL_QUEUE()) != 0)
{
@@ -209,6 +211,7 @@ pgwin32_create_signal_listener(pid_t pid)
void
pg_queue_signal(int signum)
{
+ Assert(pgwin32_signal_event != NULL);
if (signum >= PG_SIGNAL_COUNT || signum <= 0)
return;
index 436cbae48263d8d64caa85e60b9795fda6f28402..f37afc75121209d214e87a8685f63d521527ca12 100644 (file)
@@ -70,6 +70,9 @@ pgwin32_open(const char *fileName, int fileFlags,...)
(O_RANDOM | O_SEQUENTIAL | O_TEMPORARY) |
_O_SHORT_LIVED | O_DSYNC | O_DIRECT |
(O_CREAT | O_TRUNC | O_EXCL) | (O_TEXT | O_BINARY))) == fileFlags);
+#ifndef FRONTEND
+ Assert(pgwin32_signal_event != NULL); /* small chance of pg_usleep() */
+#endif
#ifdef FRONTEND