Replace most strdup with gmx_strdup
[alexxy/gromacs.git] / src / programs / view / buttons.cpp
index 21012794ec4404399a4059dfe75efe78fbf4da87..a8a39f11e050e63b2e7fe5ba757bb9d725f00bd3 100644 (file)
@@ -42,6 +42,7 @@
 #include <algorithm>
 
 #include "macros.h"
+#include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/smalloc.h"
 
 #include "x11.h"
@@ -116,7 +117,7 @@ static bool VBCallBack(t_x11 *x11, XEvent *event, Window /*w*/, void *data)
 void set_vbtime(t_x11 *x11, t_butbox *vbox, char *text)
 {
     sfree(vbox->wd.text);
-    vbox->wd.text = strdup(text);
+    vbox->wd.text = gmx_strdup(text);
     ExposeWin(x11->disp, vbox->wd.self);
 }