lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Check for null pointer


From: Dan Eble
Subject: Check for null pointer
Date: Wed, 17 Aug 2011 01:15:04 -0400

I think the following code should check that ev is not null before 
dereferencing it.  This might be a factor in a segfault I saw.  (Sorry to be so 
vague, but I am not going to build lilypond to test the theory.  It would take 
a credible threat of violence to change my mind.)  A grep suggests that there 
may be other similar cases.

void
Dispatcher::dispatch (SCM sev)
{
  Stream_event *ev = unsmob_stream_event (sev);
  SCM class_symbol = ev->get_property ("class");
-- 
Dan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]