Re: Testing on NULL an unitialized values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> The test
>   if( template )
> makes only sense, if you can be sure that uninitialzed values
> will definitelky be NULL.

You must have missed the g_return_val_if_fail (! template ||
GIMP_IS_CONTEXT (template), NULL) .

It checks if template is NULL or a pointer to a valid GimpContext. If
template is some random non-NULL value, the test will fail and a
warning message will be printed. Such warning messages indicate a
programmer error and should be dealt with during development.

--tml
_______________________________________________
Gimp-developer mailing list
Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux