Revision: 54411
http://brlcad.svn.sourceforge.net/brlcad/?rev=54411&view=rev
Author: brlcad
Date: 2013-02-14 19:57:54 +0000 (Thu, 14 Feb 2013)
Log Message:
-----------
all of these can be null, so make sure they're not. encountered crash on null
ged_view when sourcing a script.
Modified Paths:
--------------
brlcad/trunk/src/mged/cmd.c
Modified: brlcad/trunk/src/mged/cmd.c
===================================================================
--- brlcad/trunk/src/mged/cmd.c 2013-02-14 19:42:57 UTC (rev 54410)
+++ brlcad/trunk/src/mged/cmd.c 2013-02-14 19:57:54 UTC (rev 54411)
@@ -2046,11 +2046,16 @@
int
cmd_draw(ClientData UNUSED(clientData), Tcl_Interp *UNUSED(interpreter), int
argc, const char *argv[])
{
- struct ged_view *gvp = gedp->ged_gvp;
+ struct ged_view *gvp;
- gvp->gv_x_samples = dmp->dm_width;
- gvp->gv_y_samples = dmp->dm_height;
+ if (gedp)
+ gvp = gedp->ged_gvp;
+ if (gvp && dmp) {
+ gvp->gv_x_samples = dmp->dm_width;
+ gvp->gv_y_samples = dmp->dm_height;
+ }
+
return edit_com(argc, argv, 1, 1);
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits