screenshooter: Abandon recording rather than use unitialised format
authorRob Bradford <rob@linux.intel.com>
Wed, 5 Dec 2012 18:47:03 +0000 (18:47 +0000)
committerKristian Høgsberg <krh@bitplanet.net>
Fri, 7 Dec 2012 03:30:49 +0000 (22:30 -0500)
Abandon the recording if the format is not known - this prevents the use of an
unitialised member is the header struct.

src/screenshooter.c

index 422c2a9..24999f3 100644 (file)
@@ -418,7 +418,7 @@ weston_recorder_create(struct weston_output *output, const char *filename)
                break;
        default:
                weston_log("unknown recorder format\n");
-               break;
+               return;
        }
 
        header.width = output->current->width;