[Marble-bugs] [Bug 289420] crash with gpsd not running

Dennis Nienhüser earthwings at gentoo.org
Fri Jan 20 22:30:42 UTC 2012


https://bugs.kde.org/show_bug.cgi?id=289420





--- Comment #3 from Dennis Nienhüser <earthwings gentoo org>  2012-01-20 22:30:42 ---
Git commit 91fc3d70ec2af2217e99d867f6bef19bf828bf0c by Dennis Nienhüser.
Committed on 18/01/2012 at 19:13.
Pushed by nienhueser into branch 'Touch/1.3'.

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 at gmail.com
REVIEW: 103717
(cherry picked from commit 2404dd076c9e44f140d8aba61cd0f45a84493969)

M  +5    -4    src/plugins/positionprovider/gpsd/GpsdConnection.cpp

http://commits.kde.org/marble/91fc3d70ec2af2217e99d867f6bef19bf828bf0c

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Marble-bugs mailing list