xcb: Ensure the XCB connection is valid before using it.

This commit is contained in:
Colin Guthrie 2010-09-18 10:35:38 +01:00
parent 38778117f8
commit 24014e779c
2 changed files with 10 additions and 0 deletions

View file

@ -100,6 +100,11 @@ int main(int argc, char *argv[]) {
goto finish;
}
if (xcb_connection_has_error(xcb)) {
pa_log(_("xcb_connection_has_error() returned true"));
goto finish;
}
switch (mode) {
case DUMP: {
char t[1024];