Fixed wrong indented code.
Use g_return_*() function to avoid programming issues.