diff --git a/src/d_deh.c b/src/d_deh.c
index b8007ee6e..28c14badd 100644
--- a/src/d_deh.c
+++ b/src/d_deh.c
@@ -72,7 +72,7 @@ static int  linecount;
 int         dehcount = 0;
 int         dehmaptitlecount = 0;
 bool        dehacked = false;
-bool        norocketsmoke = false;
+bool        norockettrails = false;
 
 extern byte *defined_codeptr_args;
 
@@ -3842,7 +3842,7 @@ static void deh_procText(DEHFILE *fpin, const char *line)
                 mobjinfo[MT_BARREL].frames = 2;
             }
             else if (i == SPR_RSMK)
-                norocketsmoke = true;
+                norockettrails = true;
         }
     }
 
@@ -4140,7 +4140,7 @@ void deh_procBexSprites(DEHFILE *fpin, const char *line)
                 mobjinfo[MT_BARREL].frames = 2;
             }
             else if (match == SPR_RSMK)
-                norocketsmoke = true;
+                norockettrails = true;
 
             sprnames[match] = M_StringDuplicate(candidate);
         }
@@ -4456,7 +4456,7 @@ void D_PostProcessDeh(void)
                 states[i].args[j] = bexptr_match->default_args[j];
     }
 
-    norocketsmoke |= (!states[S_TRAIL].dehacked && !states[S_TRAIL2].dehacked
+    norockettrails |= (!states[S_TRAIL].dehacked && !states[S_TRAIL2].dehacked
         && !states[S_TRAIL3].dehacked && !states[S_TRAIL4].dehacked);
 
     dsdh_FreeTables();
diff --git a/src/d_deh.h b/src/d_deh.h
index e46f50570..27d204f14 100644
--- a/src/d_deh.h
+++ b/src/d_deh.h
@@ -541,7 +541,7 @@ extern const int    nummapnamesn;
 
 extern int          dehcount;
 extern int          dehmaptitlecount;
-extern bool         norocketsmoke;
+extern bool         norockettrails;
 
 void D_ProcessDehFile(char *filename, int lumpnum, bool autoloaded);
 void D_BuildBEXTables(void);
diff --git a/src/p_enemy.c b/src/p_enemy.c
index b7519b4d6..407343787 100644
--- a/src/p_enemy.c
+++ b/src/p_enemy.c
@@ -1291,7 +1291,7 @@ void A_Tracer(mobj_t *actor, player_t *player, pspdef_t *psp)
     // spawn a puff of smoke behind the homing rocket
     if (!doom4vanilla)
     {
-        if (r_rockettrails && !PUFFA0 && !norocketsmoke && !incompatiblepalette)
+        if (r_rockettrails && !PUFFA0 && !norockettrails && !incompatiblepalette)
             actor->flags2 |= MF2_SMOKETRAIL;
         else
             P_SpawnPuff(actor->x, actor->y, actor->z, actor->angle);
diff --git a/src/p_mobj.c b/src/p_mobj.c
index 00ad72f26..43573c136 100644
--- a/src/p_mobj.c
+++ b/src/p_mobj.c
@@ -1740,7 +1740,7 @@ mobj_t *P_SpawnPlayerMissile(mobj_t *source, mobjtype_t type)
     P_NoiseAlert(source);
 
     if (type == MT_ROCKET && r_rockettrails && !(th->flags & MF_BOUNCES)
-        && viewplayer->readyweapon == wp_missile && !chex && !hacx && !norocketsmoke && !incompatiblepalette)
+        && viewplayer->readyweapon == wp_missile && !chex && !hacx && !norockettrails && !incompatiblepalette)
     {
         th->flags2 |= MF2_SMOKETRAIL;
         th->pursuecount = 0;
diff --git a/src/v_video.c b/src/v_video.c
index 7e0e0efa9..002334b92 100644
--- a/src/v_video.c
+++ b/src/v_video.c
@@ -1758,14 +1758,14 @@ char    lbmpath2[MAX_PATH];
 static bool V_SavePNG(SDL_Window *sdlwindow, SDL_Renderer *sdlrenderer, const char *path)
 {
     bool        result = false;
-    int         width;
-    int         height;
+    int         width = 0;
+    int         height = 0;
     SDL_Surface *screenshot;
 
     SDL_GetWindowSize(sdlwindow, &width, &height);
 
-    if ((screenshot = SDL_CreateRGBSurface(0, (vid_widescreen ? width : height * 4 / 3), height,
-        bpp, rmask, gmask, bmask, amask)))
+    if (width && height && (screenshot = SDL_CreateRGBSurface(0, (vid_widescreen ? width : height * 4 / 3),
+        height, bpp, rmask, gmask, bmask, amask)))
     {
         if (!SDL_RenderReadPixels(sdlrenderer, NULL, 0, screenshot->pixels, screenshot->pitch))
             result = !IMG_SavePNG(screenshot, path);