Skip to content
Snippets Groups Projects
Commit 0f62cd83 authored by deuce's avatar deuce
Browse files

Work around possible NULL dereference if the mode is not initialized within

.5 seconds of initialization.  This may fix the reported crashes on OS X
at startup using SDL mode.
parent 5cf9a426
Branches
Tags
No related merge requests found
......@@ -25,7 +25,7 @@
#include "allfonts.h"
#include "bitmap_con.h"
static char *screen;
static char *screen=NULL;
int screenwidth;
int screenheight;
#define PIXEL_OFFSET(x,y) ( (y)*screenwidth+(x) )
......@@ -62,7 +62,9 @@ static void blinker_thread(void *data)
int count=0;
while(1) {
SLEEP(10);
do {
SLEEP(10);
} while(screen==NULL);
count++;
pthread_mutex_lock(&vstatlock);
if(count==50) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment