Skip to content
Commit f21ea05a authored by Dennis Nienhüser's avatar Dennis Nienhüser
Browse files

Fix segfault with newer gpsd versions.

This patch adds a check for the stream method in libgpsmm to return not
NULL value. When that method returns NULL value, it's always should be
treated as an error.

No new calls introduced (despite the #if block moved), just added a
check for one return value.

Also see http://git.savannah.gnu.org/cgit/gpsd.git/commit/libgpsmm.cpp?id=ce15eae5b1170acebdbe88dd9a8a011a6d6957fb
for explanation: «C++ clients should test the return from the stream
method to see if the open succeeded.»

This fixes a segfault on newer gpsd versions, and should not affect
older versions.

Patch by Nikita Skovoroda, thanks!
CCMAIL: chalkerx@gmail.com
REVIEW: 103717
CCBUG: 289420
(cherry picked from commit 2404dd07)
parent b6e5528b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment