I'm creating an app using nimpy and wxpython. Recently i've experienced many 
crashes so i tried to investigate by debugging the app manually with gdb. The 
relevant code is here:
    
    
    #let address = cast[int](addr(itm.bmp))
    if itm.bmp != nil:    #py.None also fails
        discard dc.DrawBitmap(itm.bmp,  itm.left - x,  itm.top - y,  true)
    
    
    Run

I checked with gdb and saw that the app crashes when itm.bmp= (rawPyObj = 0x0) 
which is a null address. How can i check for that? Checking for nil and py.None 
fails. I tried to cast the address of itm.bmp to an int and check if it's 0 but 
gdb says its value is (optimized out) and so i cannot see the value, but it 
doesn't work anyway. Is there a solution?

Reply via email to