diff options
author | sleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2013-07-13 20:37:21 +0000 |
---|---|---|
committer | sleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2013-07-13 20:37:21 +0000 |
commit | d045e724b04751c32d9fb16fe557310d6b344ed6 (patch) | |
tree | 348982a8ff4008983916195f9330f2eeb6cf6a4b /navit/navit.c | |
parent | cc9c9726f2edc87b8509b2b6f0ae036b3efe37d7 (diff) | |
download | navit-svn-d045e724b04751c32d9fb16fe557310d6b344ed6.tar.gz |
Fix:core:Integrate transform_setup into transform_new. Avoids two-step initialization and access to undefined variables in struct transform.|Part of fix for #1145.
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5544 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/navit.c')
-rw-r--r-- | navit/navit.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/navit/navit.c b/navit/navit.c index 1f75739a..2a92f5a4 100644 --- a/navit/navit.c +++ b/navit/navit.c @@ -1405,15 +1405,12 @@ navit_new(struct attr *parent, struct attr **attrs) this_->radius = 30; this_->border = 16; - this_->trans = transform_new(); - this_->trans_cursor = transform_new(); - transform_set_projection(this_->trans_cursor, pro); transform_from_geo(pro, &g, &co); center.x=co.x; center.y=co.y; center.pro = pro; - - transform_setup(this_->trans, ¢er, zoom, (this_->orientation != -1) ? this_->orientation : 0); + this_->trans = transform_new(¢er, zoom, (this_->orientation != -1) ? this_->orientation : 0); + this_->trans_cursor = transform_new(¢er, zoom, (this_->orientation != -1) ? this_->orientation : 0); this_->bookmarks=bookmarks_new(&this_->self, NULL, this_->trans); |