diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-25 00:19:01 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-25 00:19:01 +0400 |
commit | 27d19aaaf449037f3437996406ed9b77c09831a2 (patch) | |
tree | efbd11bfc23efec3ae067b803db95af01cbccc8f | |
parent | 18b1ab1598b6b5b2623c170369ce0765c7e63533 (diff) |
minor fixes
- build with netbsd works again.
- select uv more/less was crashing when called outside image space.
- node RNA property update was crashing when not called in node space.
-rw-r--r-- | source/blender/blenlib/intern/storage.c | 19 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_draw.c | 11 | ||||
-rw-r--r-- | source/blender/editors/uvedit/uvedit_ops.c | 4 |
3 files changed, 18 insertions, 16 deletions
diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index 841207b2ed4..66e749011c3 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -31,27 +31,26 @@ * \ingroup bli */ - #include <sys/types.h> #include <stdio.h> #include <stdlib.h> #ifndef WIN32 -#include <dirent.h> +# include <dirent.h> #endif #include <time.h> #include <sys/stat.h> #if defined(__sun__) || defined(__sun) || defined(__NetBSD__) -#include <sys/statvfs.h> /* Other modern unix os's should probably use this also */ +# include <sys/statvfs.h> /* Other modern unix os's should probably use this also */ #elif !defined(__FreeBSD__) && !defined(linux) && (defined(__sparc) || defined(__sparc__)) -#include <sys/statfs.h> +# include <sys/statfs.h> #endif -#if defined(__FreeBSD__) || defined(__OpenBSD__) -#include <sys/param.h> -#include <sys/mount.h> +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) +# include <sys/param.h> +# include <sys/mount.h> #endif #if defined(linux) || defined(__CYGWIN32__) || defined(__hpux) || defined(__GNU__) || defined(__GLIBC__) @@ -59,9 +58,9 @@ #endif #ifdef __APPLE__ -/* For statfs */ -#include <sys/param.h> -#include <sys/mount.h> + /* For statfs */ +# include <sys/param.h> +# include <sys/mount.h> #endif /* __APPLE__ */ diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index 992caf5285f..3db1555757c 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -75,10 +75,13 @@ extern void ui_dropshadow(const rctf *rct, float radius, float aspect, float alp void ED_node_tree_update(const bContext *C) { SpaceNode *snode = CTX_wm_space_node(C); - snode_set_context(C); - - if (snode->nodetree && snode->nodetree->id.us == 0) - snode->nodetree->id.us = 1; + if (snode) { + snode_set_context(C); + + if (snode->nodetree && snode->nodetree->id.us == 0) { + snode->nodetree->id.us = 1; + } + } } /* id is supposed to contain a node tree */ diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index 04099cf8a47..a24669f61f5 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -1444,7 +1444,7 @@ static void UV_OT_select_more(wmOperatorType *ot) /* api callbacks */ ot->exec = uv_select_more_exec; - ot->poll = ED_operator_uvedit; + ot->poll = ED_operator_uvedit_space_image; } static int uv_select_less_exec(bContext *C, wmOperator *UNUSED(op)) @@ -1462,7 +1462,7 @@ static void UV_OT_select_less(wmOperatorType *ot) /* api callbacks */ ot->exec = uv_select_less_exec; - ot->poll = ED_operator_uvedit; + ot->poll = ED_operator_uvedit_space_image; } /* ******************** align operator **************** */ |