Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
nerrons
purr-data
Commits
5c1d8c6b
Commit
5c1d8c6b
authored
Nov 13, 2014
by
Ivica Bukvic
Browse files
*fixed regression where checkvalidwidth segfaults due to being run on an empty canvas
parent
938f9026
Changes
1
Hide whitespace changes
Inline
Side-by-side
pd/src/g_text.c
View file @
5c1d8c6b
...
...
@@ -2296,13 +2296,16 @@ void text_checkvalidwidth(t_glist *glist)
// object has 0 inlets and outlets and is therefore unaware of its possibly greater
// width)
t_gobj *yg = glist->gl_list;
while
(
yg
->
g_next
)
yg
=
yg
->
g_next
;
t_text
*
newest_t
=
(
t_text
*
)
yg
;
//fprintf(stderr, "newest object text class is %lx\n", newest_t);
t_rtext
*
yn
=
glist_findrtext
(
glist
,
newest_t
);
if
(
yn
&&
pd_class
(
&
newest_t
->
te_pd
)
==
text_class
&&
newest_t
->
te_type
!=
T_TEXT
)
text_drawborder
(
newest_t
,
glist
,
rtext_gettag
(
yn
),
rtext_width
(
yn
),
rtext_height
(
yn
),
0
);
if (yg)
{
while (yg->g_next)
yg = yg->g_next;
t_text *newest_t = (t_text *)yg;
//fprintf(stderr, "newest object text class is %lx\n", newest_t);
t_rtext *yn = glist_findrtext(glist, newest_t);
if (yn && pd_class(&newest_t->te_pd) == text_class && newest_t->te_type != T_TEXT)
text_drawborder(newest_t, glist, rtext_gettag(yn), rtext_width(yn), rtext_height(yn), 0);
}
}
/* change text; if T_OBJECT, remake it. */
...
...
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