diff gui/ui/gtk/url.c @ 33740:2c02269701bd

Remove macros guiSetFilename() and guiSetDF() from interface.h. Rename guiSetFilename() setdup() and guiSetDF() setddup() and define them in string.c as functions. Adjust malloc size to necessary size and check pointer returned by malloc() to prevent segmentation fault.
author ib
date Thu, 07 Jul 2011 10:16:22 +0000
parents 71c29e8ec68f
children e1539e14d60f
line wrap: on
line diff
--- a/gui/ui/gtk/url.c	Thu Jul 07 09:29:15 2011 +0000
+++ b/gui/ui/gtk/url.c	Thu Jul 07 10:16:22 2011 +0000
@@ -102,7 +102,7 @@
      item->url=gstrdup( str );
      gtkSet( gtkAddURLItem,0,(void *)item );
 
-     guiSetFilename( guiInfo.Filename,str ); guiInfo.FilenameChanged=1;
+     setdup( &guiInfo.Filename,str ); guiInfo.FilenameChanged=1;
      uiEventHandling( evPlayNetwork,0 );
     }
   }