gallium/hud: fix possible NULL pointer dereference
authorMarek Olšák <marek.olsak@amd.com>
Sat, 17 Oct 2015 17:05:46 +0000 (19:05 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Sat, 17 Oct 2015 17:06:27 +0000 (19:06 +0200)
Trivial.

src/gallium/auxiliary/hud/hud_context.c

index 95eed2698bc143965e3812e4374faba7fbe576cf..ffe30b8fa79bdac77d1d6581d1c65a4cca01a2a5 100644 (file)
@@ -987,6 +987,9 @@ hud_parse_env_var(struct hud_context *hud, const char *env)
 
       case ',':
          env++;
+         if (!pane)
+            break;
+
          y += height + hud->font.glyph_height * (pane->num_graphs + 2);
          height = 100;