summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <mutlaqja@ikarustech.com>2016-10-21 20:53:21 (GMT)
committerJasem Mutlaq <mutlaqja@ikarustech.com>2016-10-21 20:53:21 (GMT)
commit0a4bb6bea350f7a4d0f2cbd8f3c50176f0df0df6 (patch)
tree682c700d3df79339952ce59ac75384052c7763e2
parent69c6da9c170872da03adb83a40bb3936215ae519 (diff)
If null is sent to any param, ignore it
-rw-r--r--kstars/indi/indiccd.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/kstars/indi/indiccd.cpp b/kstars/indi/indiccd.cpp
index dd1bbd0..81d90c6 100644
--- a/kstars/indi/indiccd.cpp
+++ b/kstars/indi/indiccd.cpp
@@ -153,31 +153,31 @@ bool CCDChip::getFrameMinMax(int *minX, int *maxX, int *minY, int *maxY, int *mi
if (arg == NULL)
return false;
- *minX = arg->min;
- *maxX = arg->max;
+ if (minX) *minX = arg->min;
+ if (maxX) *maxX = arg->max;
arg = IUFindNumber(frameProp, "Y");
if (arg == NULL)
return false;
- *minY = arg->min;
- *maxY = arg->max;
+ if (minY) *minY = arg->min;
+ if (maxY) *maxY = arg->max;
arg = IUFindNumber(frameProp, "WIDTH");
if (arg == NULL)
return false;
- *minW = arg->min;
- *maxW = arg->max;
+ if (minW) *minW = arg->min;
+ if (maxW) *maxW = arg->max;
arg = IUFindNumber(frameProp, "HEIGHT");
if (arg == NULL)
return false;
- *minH = arg->min;
- *maxH = arg->max;
+ if (minH) *minH = arg->min;
+ if (maxH) *maxH = arg->max;
return true;