Add return-if-fail statement to avoid deferencing NULL object (cherry picked from commit 3104d697c0c66748ba0b005c145061499b3f1090)
In cogl use cogl-config.h and in clutter use clutter-build-config.h. We can't use clutter-config.h in clutter because its already used and installed. https://bugzilla.gnome.org/show_bug.cgi?id=768976