Skip to content
Snippets Groups Projects
Commit a8385c30 authored by rnc's avatar rnc
Browse files

fixed a coupla crash bugs @ lines 271 &288

parent de45c0dc
No related branches found
No related tags found
No related merge requests found
/* Last edited: Nov 20 14:21 2003 (rnc) */
/* file: zmapbccol.c /* file: zmapbccol.c
* Author: Simon Kelley (srk@sanger.ac.uk) * Author: Simon Kelley (srk@sanger.ac.uk)
* Copyright (c) Sanger Institute, 2003 * Copyright (c) Sanger Institute, 2003
...@@ -266,7 +267,8 @@ void zMapGeneDraw(ZMapWindow *window, ZMapColumn *col, float *offset, int frame) ...@@ -266,7 +267,8 @@ void zMapGeneDraw(ZMapWindow *window, ZMapColumn *col, float *offset, int frame)
int box; int box;
nbcPrivate *bc = (nbcPrivate *)col->private; nbcPrivate *bc = (nbcPrivate *)col->private;
float maxwidth = *offset; float maxwidth = *offset;
if (meth->flags & METHOD_BUMPABLE)
if (meth && (meth->flags & METHOD_BUMPABLE))
bc->bump = bumpCreate(30, 0); bc->bump = bumpCreate(30, 0);
else else
bc->bump = NULL; bc->bump = NULL;
...@@ -282,7 +284,10 @@ void zMapGeneDraw(ZMapWindow *window, ZMapColumn *col, float *offset, int frame) ...@@ -282,7 +284,10 @@ void zMapGeneDraw(ZMapWindow *window, ZMapColumn *col, float *offset, int frame)
float e1, e2, y, x; float e1, e2, y, x;
int xoff = 1; int xoff = 1;
struct geneSelectData *sd; struct geneSelectData *sd;
bumpItem(bc->bump, 1, seg->x2 - seg->x1, &xoff, &y);
if (bc->bump)
bumpItem(bc->bump, 1, seg->x2 - seg->x1, &xoff, &y);
x = *offset + xoff; x = *offset + xoff;
if (x > maxwidth) if (x > maxwidth)
maxwidth = x; maxwidth = x;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment