Skip to content
  • Marc-André Lureau's avatar
    glog: fix crash on windows with --subsystem,windows app · 615b847d
    Marc-André Lureau authored and Matthias Clasen's avatar Matthias Clasen committed
    A windows application compiled with -Wl,--subsystem,windows has no
    console attached. When started from the start menu for ex, it will crash
    when a function attempt to use g_log:
    
     #10 0x00a21b26 in g_logv (log_domain=0xa842e1 <__func__.7668+329> "GLib", log_level=G_LOG_LEVEL_CRITICAL, format=0xa845c6 <__func__.7668+1070> "%s: assertion '%s' failed", args=0x28f2bc "PG"")
     #11 0x00a21bb1 in g_log (log_domain=0xa842e1 <__func__.7668+329> "GLib", log_level=G_LOG_LEVEL_CRITICAL, format=0xa845c6 <__func__.7668+1070> "%s: assertion '%s' failed") at gmessages.c:1337
     #12 0x00a22bac in g_return_if_fail_warning (log_domain=0xa842e1 <__func__.7668+329> "GLib", pretty_function=0xa84750 <__func__.65002> "g_log_writer_supports_color",
         expression=0xa844de <__func__.7668+838> "output_fd >= 0") at gmessages.c:2453
     #13 0x00a2239e in g_log_writer_supports_color (output_fd=-2) at gmessages.c:1826
     #14 0x00a226ac in g_log_writer_standard_streams (log_level=G_LOG_LE...
    615b847d