|
From: <ai...@us...> - 2013-09-22 05:46:11
|
Revision: 12514
http://sourceforge.net/p/plplot/code/12514
Author: airwin
Date: 2013-09-22 05:46:07 +0000 (Sun, 22 Sep 2013)
Log Message:
-----------
Implement sanity check that plcolorbar caller does not specify NULL
array pointers for one of the label_opts or labels arrays when
n_labels > 0.
Modified Paths:
--------------
trunk/src/pllegend.c
Modified: trunk/src/pllegend.c
===================================================================
--- trunk/src/pllegend.c 2013-09-22 02:20:12 UTC (rev 12513)
+++ trunk/src/pllegend.c 2013-09-22 05:46:07 UTC (rev 12514)
@@ -1659,6 +1659,13 @@
return;
}
+ // Sanity check for NULL label arrays.
+ if ( n_labels > 0 && ( label_opts == NULL || labels == NULL ) )
+ {
+ plabort( "plcolorbar: label_opts and labels arrays must be defined when n_labels > 0." );
+ return;
+ }
+
if ( n_axes < 1 )
{
plabort( "plcolorbar: At least one axis must be specified" );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|