From: Lars Op den Kamp Date: Thu, 8 Dec 2011 18:30:06 +0000 (+0100) Subject: cec: fixed segfault on exit when calling cec-client -l X-Git-Tag: upstream/2.2.0~1^2~44^2~10 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=d9c13c6deb49830ef79ca3972934bc2412cdffd8;p=deb_libcec.git cec: fixed segfault on exit when calling cec-client -l --- diff --git a/src/testclient/main.cpp b/src/testclient/main.cpp index f27fda9..fb5c7c0 100644 --- a/src/testclient/main.cpp +++ b/src/testclient/main.cpp @@ -795,7 +795,7 @@ bool ProcessCommandLineArguments(int argc, char *argv[]) { bool bReturn(true); int iArgPtr = 1; - while (iArgPtr < argc) + while (iArgPtr < argc && bReturn) { if (argc >= iArgPtr + 1) { @@ -885,6 +885,7 @@ bool ProcessCommandLineArguments(int argc, char *argv[]) { ListDevices(parser); UnloadLibCec(parser); + parser = NULL; } bReturn = false; }