Stopped MTRelease being called with a NULL pointer
This commit is contained in:
parent
65875f523f
commit
7d3e9e8648
|
@ -1299,7 +1299,13 @@ cdeclareInit _ _ _ = Nothing
|
|||
|
||||
-- | Free a declared item that's going out of scope.
|
||||
cdeclareFree :: Meta -> A.Type -> A.Variable -> Maybe (CGen ())
|
||||
cdeclareFree _ _ _ = Nothing -- TODO free mobiles that are going out of scope
|
||||
cdeclareFree _ (A.Mobile {}) v = Just $
|
||||
do tell ["if ("]
|
||||
call genVariable v
|
||||
tell ["!=NULL){MTRelease(wptr,(void*)"]
|
||||
call genVariable v
|
||||
tell [");}"]
|
||||
cdeclareFree _ _ _ = Nothing
|
||||
|
||||
{-
|
||||
Original Abbrev
|
||||
|
|
Loading…
Reference in New Issue
Block a user