J.M. Maurer wrote:
> On Sun, 2007-07-22 at 23:00 -0700, sum1_lists@yahoo.com wrote:
>   
>>> +     AbiCollabSessionManager * pSessionManager=
>>>       
>> AbiCollabSessionManager::getManager();
>>     
>>> +     UT_return_if_fail(pSessionManager);
>>> +     m_hInstance=pSessionManager->getInstance();
>>>  
>>>       
>> [snip]
>>     
>>> -
>>> -     vbox = gtk_vbox_new(FALSE, 6);
>>> -     GtkVBox* parent = (GtkVBox*)pEmbeddingParent;
>>> +     m_hServerEntry = CreateWindow("EDIT", "", ES_LEFT | WS_CHILD |
>>>       
>> WS_VISIBLE | WS_BORDER | WS_TABSTOP,
>>     
>>> +     66, 71, 121, 14, m_hBox,  NULL,  m_hInstance, NULL);
>>>       
>> It looks like m_hInstance will be uninitialized if pSessionManager is
>> NULL in the constructor above. 
>>     
>
> UT_return_if_fail in a constructor is scary enough :)
>
> In rp's defence, if pSessionManager is NULL, then something is *really*
> wrong. It's like XAP_App::getApp() returning NULL :)
>
> Marc
>
>
>   
Good catch Sum1 - didn't think of that one.  Something could be *really* 
wrong - this is a Windows build we're talking about here.  Any 
suggestions as to better ways to handle that case?  (This code is in 
there for each dialog at least once...)
I also realized as I was heading to bed a few other places I overused 
UT_return_if_fail (in TCP backend) and I'll fix them tonight.
Ryan
-- Ryan Pavlik AbiWord Win32 Platform Maintainer, Art Lead: www.abisource.com AbiWord Community Outreach Project: www.cleardefinition.com/oss/abi/blog/ "Optimism is the father that leads to achievement." -- Helen Keller "The folder structure in a modern Linux distribution such as Ubuntu was largely inspired by the original UNIX foundations that were created by men with large beards and sensible jumpers." -- Jono Bacon, The Ubuntu GuideReceived on Mon Jul 23 15:37:45 2007
This archive was generated by hypermail 2.1.8 : Mon Jul 23 2007 - 15:37:45 CEST