summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2009-07-16 17:29:17 +0000
committerjstebbins <[email protected]>2009-07-16 17:29:17 +0000
commit149a32aa1e1ff4ac32f683d0444c70f625e8fb0b (patch)
tree73f8d18cf8d2881bd6fec2b4588db77f8bf325ce
parent8a9644c257d821341ca6ebe94b31be553971a07d (diff)
LinGui: fix crash on empty buffer from stderr
somehow, i'm getting a buffer that has nothing but a '\0' char g_io_channel_write_chars gets really upset about the nil character and crashes git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2697 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--gtk/src/callbacks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index 54a5d0ca2..bccc03005 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -2628,7 +2628,7 @@ ghb_log_cb(GIOChannel *source, GIOCondition cond, gpointer data)
signal_user_data_t *ud = (signal_user_data_t*)data;
status = g_io_channel_read_line (source, &text, &length, NULL, &gerror);
- if (text != NULL)
+ if (text != NULL && length > 0 && text[length-1] != 0)
{
GdkWindow *window;
gint width, height;