@codebrainz the file_name can be null for unnamed docs, or am I wrong ?

An assert carries the intent to say "if this is null, then there is a 
programming error elsewhere" while an if (null) says null is expectable (which 
isn't the case here).

For API functions we usually use g_return_if_fail which logs an error does not 
abort the program, to save the user from poorly written plugins. But the 
function isnt part of the API so IMO an assert is perfectly appropriate.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1537#issuecomment-315511861

Reply via email to