MonetDB: default - Protect against NULL pointer.

2018-10-17 Thread Sjoerd Mullender
Changeset: 9f8602e8c51d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9f8602e8c51d
Modified Files:
monetdb5/optimizer/opt_projectionpath.c
Branch: default
Log Message:

Protect against NULL pointer.


diffs (16 lines):

diff --git a/monetdb5/optimizer/opt_projectionpath.c 
b/monetdb5/optimizer/opt_projectionpath.c
--- a/monetdb5/optimizer/opt_projectionpath.c
+++ b/monetdb5/optimizer/opt_projectionpath.c
@@ -236,8 +236,10 @@ OPTprojectionpathImplementation(Client c

/* inject the complete sub-path */
 #ifdef DEBUG_OPT_PROJECTIONPATH
-   fprintf(stderr,"#inject ");
-   fprintInstruction(stderr,mb, 0, r, 
LIST_MAL_ALL);
+   if (r) {
+   fprintf(stderr,"#inject ");
+   fprintInstruction(stderr,mb, 0, r, 
LIST_MAL_ALL);
+   }
 #endif
if ( getFunctionId(p) == projectionRef){
if( r &&  getModuleId(r)== algebraRef 
&& ( getFunctionId(r)== projectionRef  || getFunctionId(r)== projectionpathRef) 
){
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Protect against NULL pointer.

2017-02-15 Thread Sjoerd Mullender
Changeset: ba77cb1426fd for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ba77cb1426fd
Modified Files:
sql/storage/bat/bat_storage.c
Branch: default
Log Message:

Protect against NULL pointer.


diffs (13 lines):

diff --git a/sql/storage/bat/bat_storage.c b/sql/storage/bat/bat_storage.c
--- a/sql/storage/bat/bat_storage.c
+++ b/sql/storage/bat/bat_storage.c
@@ -916,7 +916,8 @@ count_idx_upd(sql_trans *tr, sql_idx *i)
assert (isTable(i->t)) ;
if (!i->data) {
sql_idx *oi = tr_find_idx(tr->parent, i);
-   i->data = timestamp_delta(oi->data, tr->stime);
+   if (oi)
+   i->data = timestamp_delta(oi->data, tr->stime);
}
b = i->data;
if (!b)
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list