X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fhelper-fns.h;h=2c2db92c46a87005a1f5b79529c4351bfda9f51b;hb=91c307b04acb17109e2811ed9f525217e03cea02;hp=18e065a8dc85074842e37ac3bf2e807871846ad0;hpb=0643e8d8cda20016145a6fd853cb32ca55628797;p=inkscape.git diff --git a/src/helper-fns.h b/src/helper-fns.h index 18e065a8d..2c2db92c4 100644 --- a/src/helper-fns.h +++ b/src/helper-fns.h @@ -5,7 +5,7 @@ * Some helper functions * * Authors: - * Felipe Corrêa da Silva Sanches + * Felipe Corrêa da Silva Sanches * * * Copyright (C) 2006 Hugo Rodrigues @@ -32,7 +32,10 @@ * is not known beforehand. For example, see sp_feColorMatrix_set in * sp-fecolormatrix.cpp */ inline double helperfns_read_number(gchar const *value, bool warning = true) { - if (!value) return 0; + if (!value) { + g_warning("Called helperfns_read_number with value==null_ptr, this can lead to unexpected behaviour."); + return 0; + } char *end; double ret = g_strtod(value, &end); if (*end) {