Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tg
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
tg
Commits
a4758e8c
Commit
a4758e8c
authored
Jul 30, 2015
by
vysheng
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #708 from JuanPotato/patch-3
Fix when crashing if print_name is null
parents
9d5cfe39
f3eabae0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
json-tg.c
json-tg.c
+6
-3
No files found.
json-tg.c
View file @
a4758e8c
...
@@ -107,12 +107,15 @@ json_t *json_pack_peer (tgl_peer_id_t id) {
...
@@ -107,12 +107,15 @@ json_t *json_pack_peer (tgl_peer_id_t id) {
default:
default:
assert
(
0
);
assert
(
0
);
}
}
assert
(
json_object_set
(
res
,
"print_name"
,
json_string
(
s
))
>=
0
);
assert
(
json_object_set
(
res
,
"print_name"
,
json_string
(
s
))
>=
0
);
return
res
;
return
res
;
}
}
if
(
P
->
print_name
!=
NULL
){
assert
(
json_object_set
(
res
,
"print_name"
,
json_string
(
P
->
print_name
))
>=
0
);
assert
(
json_object_set
(
res
,
"print_name"
,
json_string
(
P
->
print_name
))
>=
0
);
}
else
{
assert
(
json_object_set
(
res
,
"print_name"
,
json_string
(
""
))
>=
0
);
}
assert
(
json_object_set
(
res
,
"flags"
,
json_integer
(
P
->
flags
))
>=
0
);
assert
(
json_object_set
(
res
,
"flags"
,
json_integer
(
P
->
flags
))
>=
0
);
switch
(
tgl_get_peer_type
(
id
))
{
switch
(
tgl_get_peer_type
(
id
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment