comparison src/stringref.c @ 7772:85abf91f2387

[gaim-migrate @ 8417] I suppose this is reasonable... committer: Tailor Script <tailor@pidgin.im>
author Ethan Blanton <elb@pidgin.im>
date Fri, 05 Dec 2003 21:42:00 +0000
parents 4e5c48ea9478
children 136c65e68fb1
comparison
equal deleted inserted replaced
7771:a481ffe303d2 7772:85abf91f2387
30 #include "stringref.h" 30 #include "stringref.h"
31 31
32 GaimStringref *gaim_stringref_new(const char *value) 32 GaimStringref *gaim_stringref_new(const char *value)
33 { 33 {
34 GaimStringref *newref; 34 GaimStringref *newref;
35
36 if (value == NULL)
37 return NULL;
35 38
36 newref = g_malloc(sizeof(GaimStringref) + strlen(value) + 1); 39 newref = g_malloc(sizeof(GaimStringref) + strlen(value) + 1);
37 strcpy(newref->value, value); 40 strcpy(newref->value, value);
38 newref->ref = 1; 41 newref->ref = 1;
39 42