[mythtv-commits] Ticket #5000: null check of m_priv unnecessary in OpenGLContext dtor

MythTV mythtv at cvs.mythtv.org
Wed Mar 19 18:08:00 UTC 2008


#5000: null check of m_priv unnecessary in OpenGLContext dtor
---------------------------------------------+------------------------------
 Reporter:  Erik Hovland <erik at hovland.org>  |       Owner:  ijr    
     Type:  defect                           |      Status:  new    
 Priority:  trivial                          |   Milestone:  unknown
Component:  mythtv                           |     Version:  head   
 Severity:  low                              |     Mlocked:  0      
---------------------------------------------+------------------------------
 The dtor for OpenGLContext makes a check for null of m_priv. It turns out
 that m_priv is allocated in the ctor using new and never deleted or
 reallocated elsewhere in the class code. So there is no need to check for
 null that I can see. Which means the check is unnecessary. I should add
 that the check for m_priv comes after m_priv is dereferenced by
 MakeCurrent(). So if the devs think the m_priv check is necessary after
 all, it should fall before MakeCurrent() is called to avoid any
 segfaulting.

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/5000>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list