Kaydet (Commit) cf7b4bf6 authored tarafından Enrico Tröger's avatar Enrico Tröger

fixed a crash when starting Geany without debug messages


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@292 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst eff26d5b
...@@ -87,7 +87,7 @@ static GOptionEntry entries[] = ...@@ -87,7 +87,7 @@ static GOptionEntry entries[] =
void geany_debug(gchar const *format, ...) void geany_debug(gchar const *format, ...)
{ {
#ifndef GEANY_DEBUG #ifndef GEANY_DEBUG
if (app->debug_mode) if (app != NULL && app->debug_mode)
#endif #endif
{ {
va_list args; va_list args;
...@@ -337,12 +337,12 @@ static gboolean read_fifo(GIOChannel *source, GIOCondition condition, gpointer d ...@@ -337,12 +337,12 @@ static gboolean read_fifo(GIOChannel *source, GIOCondition condition, gpointer d
if (status != G_IO_STATUS_NORMAL) if (status != G_IO_STATUS_NORMAL)
return TRUE; return TRUE;
else else
{ {
GIOChannel *ioc = g_io_channel_unix_new(open(fifo_name, O_RDONLY | O_NONBLOCK)); GIOChannel *ioc = g_io_channel_unix_new(open(fifo_name, O_RDONLY | O_NONBLOCK));
g_io_add_watch(ioc, G_IO_IN | G_IO_PRI, read_fifo, NULL); g_io_add_watch(ioc, G_IO_IN | G_IO_PRI, read_fifo, NULL);
return FALSE; return FALSE;
} }
} }
...@@ -350,7 +350,7 @@ static void write_fifo(gint argc, gchar **argv) ...@@ -350,7 +350,7 @@ static void write_fifo(gint argc, gchar **argv)
{ {
gint i; gint i;
GIOChannel *ioc; GIOChannel *ioc;
for(i = 1; i < argc; i++) for(i = 1; i < argc; i++)
{ {
if (argv[i] && g_file_test(argv[i], G_FILE_TEST_IS_REGULAR || G_FILE_TEST_IS_SYMLINK)) if (argv[i] && g_file_test(argv[i], G_FILE_TEST_IS_REGULAR || G_FILE_TEST_IS_SYMLINK))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment