fix an uninitialized variable

This commit is contained in:
Bill Currie 2003-05-23 17:39:33 +00:00
parent c2c3a62956
commit 66e2ef1926

View file

@ -246,7 +246,7 @@ void
SCR_ScreenShot_f (void)
{
dstring_t *pcxname = dstring_new ();
pcx_t *pcx;
pcx_t *pcx = 0;
int pcx_len;
// find a file name to save it to
@ -276,9 +276,10 @@ SCR_ScreenShot_f (void)
// for adapters that can't stay mapped in for linear writes all the time
D_DisableBackBufferAccess ();
QFS_WriteFile (pcxname->str, pcx, pcx_len);
Con_Printf ("Wrote %s\n", pcxname->str);
if (pcx) {
QFS_WriteFile (pcxname->str, pcx, pcx_len);
Con_Printf ("Wrote %s\n", pcxname->str);
}
}
dstring_delete (pcxname);
}