[gtk/gtk-3-24: 1/2] docs: Do not call GTK APIs if gtk_init_check returns FALSE



commit 392d4de8a97294498b0f5849b1ff3fd1b7b5844d
Author: Nicola Fontana <ntd entidi it>
Date:   Fri Apr 3 17:00:59 2020 +0200

    docs: Do not call GTK APIs if gtk_init_check returns FALSE
    
    See issue #994.

 gtk/gtkmain.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index ca56f94a38..f7cbb342e2 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -1090,6 +1090,9 @@ gtk_parse_args (int    *argc,
  * communication with the user - for example a curses or command line
  * interface.
  *
+ * Note that calling any GTK function or instantiating any GTK type after
+ * this function returns %FALSE results in undefined behavior.
+ *
  * Returns: %TRUE if the commandline arguments (if any) were valid and
  *     the windowing system has been successfully initialized, %FALSE
  *     otherwise


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