From e6c038125fd204d9c2f8fa3df282ec1b75bc31b1 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Thu, 13 Jan 2011 11:46:42 +0100 Subject: Fixed coredump when graphics could not be initiated For instance when DISPLAY was not set --- lib/wx/c_src/wxe_driver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/wx/c_src/wxe_driver.c') diff --git a/lib/wx/c_src/wxe_driver.c b/lib/wx/c_src/wxe_driver.c index 310325ea26..14a9d1e982 100644 --- a/lib/wx/c_src/wxe_driver.c +++ b/lib/wx/c_src/wxe_driver.c @@ -1,7 +1,7 @@ /* * %CopyrightBegin% * - * Copyright Ericsson AB 2008-2010. All Rights Reserved. + * Copyright Ericsson AB 2008-2011. All Rights Reserved. * * The contents of this file are subject to the Erlang Public License, * Version 1.1, (the "License"); you may not use this file except in @@ -146,7 +146,6 @@ static void wxe_driver_unload(void) { // fprintf(stderr, "%s:%d: UNLOAD \r\n", __FILE__,__LINE__); - meta_command(WXE_SHUTDOWN, wxe_master); stop_native_gui(wxe_master); unload_native_gui(); free(wxe_master); -- cgit v1.2.3 From 1bf0af6284aca47a6b3a823c4dd682e8fb8d4135 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Tue, 15 Feb 2011 16:49:31 +0100 Subject: Fix bad string copy during initialization This may have caused the core dump on ubuntu-64 which have happend for some people. --- lib/wx/c_src/wxe_driver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/wx/c_src/wxe_driver.c') diff --git a/lib/wx/c_src/wxe_driver.c b/lib/wx/c_src/wxe_driver.c index 14a9d1e982..2404b13cc3 100644 --- a/lib/wx/c_src/wxe_driver.c +++ b/lib/wx/c_src/wxe_driver.c @@ -117,8 +117,7 @@ wxe_driver_start(ErlDrvPort port, char *buff) if(WXE_DRV_PORT == 0) { for(; *buff != 32; buff++); buff++; - erl_wx_privdir = malloc(strlen(buff)); - strcpy(erl_wx_privdir, buff); + erl_wx_privdir = strdup(buff); WXE_DRV_PORT = port; wxe_master = data; -- cgit v1.2.3