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
Please register or sign in to comment